Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

let's analyse "collect2: ld returned 1 exit status"?

Tags:

People also ask

What is collect2 error ld returned 1 exit status?

The ld returned 1 exit status error is the consequence of your previous errors as in your example there is an earlier error - undefined reference to 'clrscr' - and this is the real one. The exit status error just signals that the linking step in the build process encountered some errors.

What does ID returned 1 exit status mean?

The C++ [Error]: Id returned 1 exit status is not a common error. It usually means that the program crashed, and it will be challenging to determine why without looking at the stack trace. The C++ compiler will display this message when an error occurs in your code.

What does collect2 mean?

27. The very same error ( collect2: error: ld returned 1 exit status ) can be caused when there is not enough space left at /usr/tmp/ . Because linker wont be able to create temporary files.


I know this indicates a linker problem, mostly unresolved symbols. I know that to resolve that problem / to get rid of that errormessage, one would have to provide much more information. I know there is a lot of questions on resolving this problems on SO already.

My questions aims at helping to understand make and ld, to find out what (and who) is trying to express what with this line.

collect2: ld returned 1 exit status 
  • What does "collect2:" mean? Is it a step make invokes ? I can't find an executable with that name on my system.
  • Does it mean I am using ld ? I configured my project / Makefile so that g++ should do the linking, so why is LD still involved
  • Who is writing that message ? make ? ld ? g++ ?
  • Is there a meaningful list of possible exit codes ?