From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Noah Aklilu" To: crossgcc@sources.redhat.com Subject: Re: Linker problem? Date: Thu, 05 Oct 2000 21:37:00 -0000 Message-id: <39DD02A5.17968.5B3694@localhost> References: X-SW-Source: 2000-10/msg00027.html -lc is the option that tells the linker to tie in the libc (or newlib) library. You are probably using printf which is in this library. Your linker doesn't know where to find your libc.a archive, so you will have to give it a -L option to let it know what the library path is. This is assuming that you installed newlib (it is separate from gcc), if you haven't that is your problem. Noah. On 5 Oct 2000, at 14:55, Torbjørn Heltne wrote: > Hello list members! > > I'm pretty new to this... but I have followed the instructions on > http://sources.redhat.com/ecos/tools/linux-arm-elf.html to install, > configure and build the arm-elf-gcc and friends. > > It went pretty smooth except that I had to use LANGUAGES="c" under "Build > and install GCC". Don't think that causes my problem though... :-) > > Anyway: trying to build the well-known "hello, world!" I bump into a > problem. Seen this one before, anyone? > > [etotorh@eto00840 ]$ make > arm-elf-gcc -O2 -c -o hello.o hello.c > arm-elf-gcc -o hello.elf startup.o syscalls.o hello.o -nostartfiles \ > -Wl,-Ttext,0,-Tdata,0x300000 > /tools/H-i686-pc-linux-gnu/arm-elf/bin/ld: cannot find -lc > collect2: ld returned 1 exit status > make: *** [hello.elf] Error 1 > [etotorh@eto00840 ]$ > > What's this "-lc" that the linker can't find? > > -- > Torbjørn Heltne > > > ------ > Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ > Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com ------------------------------------------ Noah Aklilu http://www.ee.ualberta.ca/~aklilu/ naklilu@ualberta.ca ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com