Skip to content

Windows 10 Arduino IDE compiles fail with unable to rename 'core\core.a'; reason: File exists #7518

Open
@JimBayne

Description

@JimBayne

I am unable to use the Arduino IDE 1.8.5 on Windows 10. I was previously using it on Windows 7 with no problems, but when I tried moving to Windows 10 the Arduino IDE compiles began failing on Windows 10 with ...

c:\users\jim bayne\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2\bin../lib/gcc/avr/4.9.2/../../../../avr/bin/ar.exe: unable to rename 'core\core.a'; reason: File exists

I had a similar problem with a VB project I was developing on Windows 10. There's a bug with the VB My.Computer.FileSystem.RenameFile (and probaly with the C++ equivalent) that was causing this. My solution was to use the File.Move function from the System.IO name space (ref: https://msdn.microsoft.com/en-us/library/system.io.file.move(v=vs.110).aspx ) e.g. ...

using namespace System::IO;
...
File::Move( path, path2 );
// e.g. File::Move( "D:\MyDirectory\OLD_FileName.txt", "D:\MyDirectory\NEW_FileName.txt" );

If path and path2 refer to the same directory (but have different file names), you end up with a rename, and avoid the File exists error.

Hope you're able to resolve this. The Arduino IDE is really great, and I would like to be able to continue using it on Windows 10.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: CompilationRelated to compilation of Arduino sketchesOS: WindowsSpecific to the Windows version of the Arduino IDEType: Bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions