Problem in compiling

I tried installing Arduino IDE, I had it installed about a year ago when I uninstalled it because I didn't need it. Everything went smoothly except compiling my code. I even tried to compile the Blink code given as example but I am getting an error.

Any help is appreciated.

Please post your code in code tabs. I don't see enough information in the error report to guess what the problem might be.

/*
  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
}

Your code compiles okay for me

Yes, as I said, this is official code provided by Arduino. There is no problem in the code, there is a problem in compiling, I have tried a deleting all folders and doing a clean install, yet there seems to be some problem in the software itself.

I don't know how to fix that problem sorry. I expect someone else reading this will be able to help.

Actually linking :wink:

You're the second one in a week with that problem; see Collect2.exe: error: ld returned 9 exit status. OP solved it by doing a cleanup

This might be a bit too much. Cleaning out the cache did not help for him/her, maybe downgrading the AVR board package using board manager to 1.8.3 and next upgrading to 1.8.6 again solves the issue.

Cleaning out the Temp directory might also help.

Yes, I have tried everything, here are the steps I followed:
1.Running Revo uninstaller:
a. Ran default uninstaller.
b. Ran advanced Revo function.
i. Deleted registries.
ii. Deleted unwanted folders.
2.Manually removing files:
a. Deleted everything in Program Files
b. Deleted everything in Program FIles (X86)
c. Deleted '.arduinoide' in Users folder.
d. Deleted 'Arduino Ide' and 'Arduino Ide Updater' in Users/Appdata/Local
e. Deleted Local/Temp
f. Deleted all files in Appdata/Roaming
g. Deleted 'Arduino' in Documents

Also you mention clearing cache, how do I do that?

For anyone in an emergency like me, a temporary solution is to install the Windows store Arduino IDE.

I don't see the downgrade/upgrade of the board package.

See post #2 in the first link. But with all your steps that might already have been done.

The other ones to delete are

  1. C:\Users\yourUsername\AppData\Local\Arduino15; this is where the board packages live.
  2. C:\Users\yourUsername\AppData\Roaming\arduino-ide; not sure what exactly is in there and I think that yuou already did that.

That is IDE 1.8.19, I think.

I followed you steps in Board manager, but the issue persists somehow. No idea why linking issue still coming. The error is the same after following procedure is same.

Yes unfortunately, still better than nothing.

I did downgrade/ upgrade just now and Arduino 15 also I deleted.

IDE 1.8.19 comes with AVR board package 1.8.3. When you compile with verbose output during compilation enabled, what is the reported version? If it is 1.8.6, the older IDE has picked up the leftovers of the IDE 2.x installation. If it is 1.8.3, you can try to upgrade the AVR board package to 1.8.6 and see if the error surfaces again.

To confirm your suspicion, I installed IDE 1.8.19 separately also. The Windows store version works, but not the standalone version.
I couldn't confirm the package version because the older IDEs work very slow.

Also I downgrade and upgraded AVR Board Manager in 2.3.3 not in 1.8.19.

I am unable to do any of the tasks you mentioned due to 1.8.19 being so glitchy.

I have also previously linked IDE with VS Code. My friend who never programs or touches such things gave me his laptop. I installed 2.3.3 for the first time on his laptop and it is flawless. The problem might be for specific users who have done some questionable things before

I am finishing the post here guys, refer to:

My problem was inconclusive, but follow my steps and I finally found that after leaving the software for a week, I started it again which initialized a library installation. Hope it helps.

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