Error compiling for Arduino Uno

Hi, I am new to Arduino and electronics in general and I got "The Most Complete Starter Kit, Uno R3 Project" from Elegoo. I did my best following the IDE installation instructions and was finally able to get the software to recognize the board and port. I tried running the example code "Blink" just to test if the board would receive the code but this error message came up. I've researched what I should do to fix the issue, however, nothing was working. As I mentioned I am new and have no idea what to do now to fix it so I hope that you guys can help me out. My
Thank you

[code]
/*
  Blink

  Turns an LED on for one second, then off for one second, repeatedly.

  Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
  it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
  the correct LED pin independent of which board is used.
  If you want to know what pin the on-board LED is connected to on your Arduino
  model, check the Technical Specs of your board at:
  https://www.arduino.cc/en/Main/Products

  modified 8 May 2014
  by Scott Fitzgerald
  modified 2 Sep 2016
  by Arturo Guadalupi
  modified 8 Sep 2016
  by Colby Newman

  This example code is in the public domain.

  https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
*/

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}
[/code]
type or paste code here

error message

Arduino: 1.8.18 (Windows 10), Board: "Arduino Uno"





















C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Mike\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Mike\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Mike\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=2341_0043 -ide-version=10818 -build-path C:\Users\Mike\AppData\Local\Temp\arduino_build_886006 -warnings=none -build-cache C:\Users\Mike\AppData\Local\Temp\arduino_cache_931593 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\Mike\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\Mike\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=C:\Users\Mike\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\Mike\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avr-gcc.path=C:\Users\Mike\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\Mike\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -verbose C:\Users\Mike\Desktop\arduino\sketch_dec26a\sketch_dec26a.ino

C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Mike\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Mike\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Mike\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=2341_0043 -ide-version=10818 -build-path C:\Users\Mike\AppData\Local\Temp\arduino_build_886006 -warnings=none -build-cache C:\Users\Mike\AppData\Local\Temp\arduino_cache_931593 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\Mike\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\Mike\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=C:\Users\Mike\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\Mike\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avr-gcc.path=C:\Users\Mike\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\Mike\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -verbose C:\Users\Mike\Desktop\arduino\sketch_dec26a\sketch_dec26a.ino

Using board 'uno' from platform in folder: C:\Users\Mike\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Using core 'arduino' from platform in folder: C:\Users\Mike\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...

"C:\\Users\\Mike\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Mike\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\Mike\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\Mike\\AppData\\Local\\Temp\\arduino_build_886006\\sketch\\sketch_dec26a.ino.cpp" -o nul

exec: "C:\\Users\\Mike\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++": file does not exist

Error compiling for board Arduino Uno.

This page:

Says to re-install your board support with board manager:

In order to fix it the most reliable solution is to delete the entire packages subfolder of the data folder (e.g, %HOMEPATH%/AppData/Local/Arduino15 , ~/.arduino15), then reinstall any boards platforms you need.

Welcome @olympian10

And thank you for using code tags for both the code and the error message inyour first post :+1:

You're problem is not related to the upload process and hence has been moved to the IDE 1.x section of the forum.

Adding to the above reply; if re-installation does not help, you might be using an anti-virus that blocks the avr toolchain; check the logs

I deleted the packages subfolder and installed the latest Arduino AVR Boards v1.8.6, but the problem still remains. I don't use any antivirus besides the windows 10 antivirus but disabling it also didn't fix it. Is it possible that I installed the wrong thing in boards manager? The board I'm using is an Elegoo Arduino Uno R3.
Thanks anyway

The board is probably good, and the board support. For the avr-g++ file to be absent, I would suspect an IDE installation problem - caused by ?unknown? right now. If you have no other significant discoveries, consider uninstall and reinstall the IDE.

If the IDE installation is not smooth, take notes on the problems.

I followed the path that the error message showed and found the avr-g++ file. I don't know why it is saying that doesn't exist. I reinstalled it multiple times to see if any differences occurred but there were none.

@ptillisch is the authority with the IDE, and will be around to help you.

Hi @olympian10. I didn't spot anything that would cause the error. Most often it is caused by the avr-g++.exe file having gone missing, but you say it is present.

I am wondering about the fact that you have Arduino IDE 1.8.18 installed. That is unusual for a new user who usually install the latest version (since it is listed first on the "Software" page of the Arduino website), or if for some reason they can't use that version then the latest Arduino IDE 1.x version: 1.8.19. It takes a little digging even to get Arduino IDE 1.8.18. Other than the fix for a security vulnerability, which is important but not relevant to the problem you are reporting here, Arduino IDE 1.8.19 is identical in functionality to 1.8.18 so I don't think using 1.8.18 is the cause of the error. However, I'm wondering if maybe you ended up installing a modified version of Arduino IDE obtained from some source other than the "Software" page of the Arduino website.

Sometimes the reports of mysterious problems with Arduino IDE end up being the result of modifications some 3rd parties make to the variants of the IDE they distribute. So if you got the IDE from some source other than the "Software" page of the Arduino website, I recommend you download the official build of Arduino IDE and check to see whether the problem still occurs when using that IDE. The download links are listed here:

Unless you have a specific reason for using Arduino IDE 1.x, I would also suggest trying the latest version of Arduino IDE. I don't have any specific reason for thinking that using 1.x is the cause of the problem, but it is possible that it is caused by a bug in Arduino IDE 1.x that has been fixed during the years of development work done since the release of the outdated Arduino IDE 1.8.18 and 1.8.19.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.