LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   the linker is not working (gcc ) (https://www.linuxquestions.org/questions/ubuntu-63/the-linker-is-not-working-gcc-363018/)

abd_bela 09-13-2005 01:21 PM

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

damien 09-13-2005 03:51 PM

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.


All times are GMT -5. The time now is 08:53 AM.