On 3/28/06, Eric Fisher <joefoxreal gmail.com> wrote:
> Hi,
> I'd like to know how to set the search path of glibc
for cross gcc. Suppose I
> have mips-linux-gcc installed, when I type
'mips-linux-gcc test.c -o
> test'. I think
> the tool chain should find the glibc of mips/linux
autmatically. Yet,
> it's just the
> problem I'm meeting with. It can't be searched out.
>
> I did use the flag --with-sysroot when built the
binutils and gcc. And
> the header
> files can also be found in the search list, which has
included the sysroot path.
> And I also installed the glibc under the sysroot. But,
still can't be found.
>
> /tmp/ccOgTDmg.o(.text+0x154): In function `main':
> : undefined reference to `printf'
>
What it says is that your mips-..-libc could not be found by
gcc. Well
you can try gcc -v test.c to see what exactly it is doing.
Maybe you
can post that output here. If you just want to build the
cross tool
chain please use crosstool. In case you want to do each step
manually
look into the file crosstool.sh in crosstool.
Also gcc -L/home/test/mips hello.c
> Thanks,
> Eric.
>
> --
> For unsubscribe information see http://sourcewar
e.org/lists.html#faq
>
>
--
For unsubscribe information see http://sourcewar
e.org/lists.html#faq
|