I’m creating a public locker for a project, and I’m almost done, but it says here:
Error compiling for board Arduino/Genuino Uno.
I don’t know how to fix it, I’ve tried restarting the arduino, unplugging and re-plugging the cord, but it doesn’t work. Can somebody help me? Also, here’s my code in case it has anything to do with the issue.
(i put it in a file because it’s to big to fit in this post.
When you encounter an error, you’ll see a button on the right side of the orange bar “Copy error messages” in the Arduino IDE (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…
In a forum reply here, click on the reply field.
Click the </> button on the forum toolbar. This will add the forum’s code tags markup to your reply.
Press “Ctrl + V”. This will paste the error between the code tags.
Move the cursor outside of the code tags before you add any additional text to your reply.
If the text exceeds the forum’s 9000 character limit, save it to a .txt file and post it as an attachment. If you click the “Reply” button here, you will see an “Attachments and other settings” link.
lto-wrapper.exe: fatal error: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc returned 1 exit status
Paste it into a text editor and then save the file with a .txt extension. There are plenty of good text editors. I use Notepad++: https://notepad-plus-plus.org/
But please only post things to the forum as attachments when they exceed the forum's 9000 character limit. You will be more likely to get help if you post things directly to the forum so people don't need to download a file to help you.
This is caused by a bug in the avr-gcc 5.4.0 compiler. To fix it, you only need to update your Arduino AVR Boards:
Tools > Board > Boards Manager
Wait for the downloads to finish.
Click on "Arduino AVR Boards".
Click the "Update" button".
Wait for the update to finish.
Click the "Close" button.
You will now be able to compile your sketch without getting this error.