Will not compile IDE 1.8.7 Windows 10

I cannot get the software to finish a compilation. I always get the following messages: I've tried to uninstall and reinstall but it does not clear the problem.

c:\program files (x86)\arduino\hardware\tools\avr\bin../lib/gcc/avr/5.4.0/../../../../avr/bin/ar.exe: unable to rename 'core\core.a'; reason: File exists

exit status 1
Error compiling for board Arduino Nano.
c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr5/crtatmega328p.o:(.init9+0x0): undefined reference to `main'

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Arduino Nano.

How can I delete the offending "core.a" file?

I hope someone can help as both my Windows 10 computer have the same problem.


Tony Go

This sort of error could be caused by your antivirus software. Try TEMPORARILY disabling your antivirus for a single compilation to see if the problem goes away, then turn the antivirus back on. If the problem doesn't occur with the antivirus off you will need to adjust the settings of your antivirus to whitelist the appropriate file, folder, or process so it doesn't interfere with compilation.

Thanks for the suggestion. I've tried it but it did not solve the problem and still get the existing file message.

50/50 chance but are you running the IDE as Administrator ?

Also not all AV is turned off when a user tells it to turn off.
Double check SERVICES and PROCESSES to ensure your AV etc is fully OFF.

Thanks - that did it. Never thought that McAfee would upset compiler on the Arduino IDE.

There are at least 3 AV's out there known to be too aggressive.

But if you think logically it makes sense as you are essentially writing CODE that the AV may not fully understand. So it makes a judgement call in favour of your security.

Glad you got it sorted :slight_smile: