I am getting an error when using the gcc compiler saying:

/usr/bin/ld: crt1.o: No such file. No such file or directory
collect2: ld returned 1 exit status

Can somebody please explain what this means and how it can be rectified.
Is it a problem with the compiler?
Thanks in advance.

9 Years
Discussion Span
Last Post by @bhi

Well can you tell us what you are trying to achieve here actually, I don't have much to go on from what you have posted !!
crt1.o looks to be an object file and it seems like your linker (ld) can't find it, but what are you actually doing when this error arrives would help us get a clearer picture.


This happens for any c code that i try to compile.
It even occurs for a basic program like displaying "hello" which im sure has no syntax errors in it.
When i compile using the command 'gcc filename.c' it gives the error.
Im using ubuntu 7.10 if that makes a difference.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.