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

Notices

Reply
 
Search this Thread
Old 09-13-2005, 01:21 PM   #1
abd_bela
Member
 
Registered: Dec 2002
Location: algeria
Distribution: redhat 7.3, debian lenny
Posts: 591

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


Hi,
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
bela
 
Old 09-13-2005, 03:51 PM   #2
damien
Member
 
Registered: Sep 2003
Location: Calgary, Canada
Distribution: Slackware 10.0
Posts: 90

Rep: Reputation: 15
Bela,

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:

http://www.die.net/doc/linux/man/man8/ldconfig.8.html

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

Hope this helps.

Damien

For the Horde.
 
  


Reply


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 01:38 PM
linker working concept how it works? datatab1 Programming 2 10-03-2005 01:23 PM
gcc Linker error - please help! Liche Programming 5 09-26-2005 07:14 AM
gcc linker question alenD Programming 2 08-01-2005 09:31 PM
gcc not working bluknight43 Programming 4 02-14-2005 01:15 PM


All times are GMT -5. The time now is 11:15 PM.

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