Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Ubuntu This forum is for the discussion of Ubuntu Linux.


  Search this Thread
Old 09-13-2005, 02:21 PM   #1
Registered: Dec 2002
Location: algeria
Distribution: redhat 7.3, debian lenny
Posts: 605

Rep: Reputation: 31
the linker is not working (gcc )

The gcc is not working I installed it ( the version 3.3.5)

the compilation is correct ( gcc -c ex1.c ) but a problem with the link loader this, is the output :

khel1@ubuntu510:/home/bela/fltk-1.1.6$ gcc ex1.c
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status

ex1.c contains only the famous printf("hello world").

thanks for help
Old 09-13-2005, 04:51 PM   #2
Registered: Sep 2003
Location: Calgary, Canada
Distribution: Slackware 10.0
Posts: 90

Rep: Reputation: 15

The linker can't find crt1.o in it's default set of paths. One of two things has happened. Either your gcc installation failed somewhere and there is no crt1.o at all, or (more likely) crt1.o is there but it isn't in the linker's search paths.

You need to find out if you actually have crt1.o. It's in different places in different distributions, often in /usr/lib. Do a "find . -name crt1.o" in /usr/lib. This will search /usr/lib and all subdirectories. If it's not found, do a "cd /" and try again. If it's still not found, your gcc installation is broken and you have to install it again.

If you do find it, you might need to rebuild your linker paths with ldconfig. Here's a good summary of it:

You might have to put the crt1.o directory into /etc/ and rebuild the paths.

Hope this helps.


For the Horde.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
"gcc linker" does not link C++ programs ( gxx_personality undefined ?) bahramH Programming 9 12-25-2009 02:38 PM
linker working concept how it works? datatab1 Programming 2 10-03-2005 02:23 PM
gcc Linker error - please help! Liche Programming 5 09-26-2005 08:14 AM
gcc linker question alenD Programming 2 08-01-2005 10:31 PM
gcc not working bluknight43 Programming 4 02-14-2005 02:15 PM

All times are GMT -5. The time now is 07:41 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration