Error: ld returned 5 exit status

Hi,

I'm trying to upload code to my arduino (Mega/2560) but I keep getting this error message, and I'm not sure what it means.

collect2.exe: error: ld returned 5 exit status

exit status 1 Error compiling for board Arduino/Genuino Mega or Mega 2560.

Please advise! Thank you!

lcm106: collect2.exe: error: ld returned 5 exit status exit status 1

If you scroll upward in the dialog part of the screen where that message is, do you see any other information?

A lot of errors end up with the two lines you quoted, but there's more information prior to that. If however you are getting only the "collect2.exe ... ld returned ..." message then it might be the Windows XP bug.

Are you running XP?