It was fine for the first two years but now the Arduino compiler on my Windows 10 PC frequently gives this error message. A solution is to close it and the PC down and start again. There must be a better way as this takes ages and often doesn't work.
I tried upgrading from 1.6.10 to 1.8.8, but worse if anything. Help!
When you encounter an error, you'll see a button on the right side of the orange bar "Copy error messages" (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button. Paste the error in a message here USING CODE TAGS (</> button on the forum toolbar). If the text exceeds the forum's 9000 character limit, save it to a text file and post it as an attachment. If you click the "Reply" button here, you will see an "Attachments and other settings" link.
Thanks for that. Here is the error message in full. The items at he start in square brackets appeared when I hit the </> button. I am guessing that the copied code was supposed to appear when I did this but as it didn't, I hit 'paste' instead.
[/code Arduino: 1.8.8 (Windows 10), Board: "Arduino/Genuino Uno"
c:/users/peter/appdata/local/arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.3-arduino2/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: cannot open output file
C:\Users\Peter\AppData\Local\Temp\arduino_build_800837/sketch_Mar11a_Rx.ino.elf: Permission denied
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino/Genuino Uno.
c:\users\peter\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2\bin\../lib/gcc/avr/4.9.2/../../../../avr/bin/ar.exe: unable to rename 'core\core.a'; reason: File exists
exit status 1
Error compiling for board Arduino/Genuino Uno.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Hope this gives a clue as to what's going on, thanks for helping. Will switch to verbose and see if this gives anything useful.
GBSC:
I am guessing that the copied code was supposed to appear when I did this but as it didn't, I hit 'paste' instead.
The </> button only inserts the forum markup that puts the contents in a code box. I should have said something like "Click the </> button and then paste the output".
Regarding your error:
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.
You are right. I turned off the antivirus (And the WiFi!) and the problem went away. Many thanks for your advice, now I need to work out how to get the antivirus to behave.