Hi, On Fri, Sep 20, 2013 at 06:25:19PM +0800, Li Zhijian wrote: > >>>>> > >>>>>IIIļ¼ compile a simple C program > >>>>># cat test.c > >>>>>int main () > >>>>>{ > >>>>>printf("hello world\n"); > >>>>>return 0; > >>>>>} > >>>>># source toolchain-1.3-tcmode-default/environment-setup-x86_64-poky-linux > >>>>># $CC -o test test.c -L tmp/sysroots/qemux86-64/usr/lib/ -lm OK, it looks like something strange happens in your setup.
To debug it, let's add '-Wl,--verbose' at the end of your command and you should be able to see where the linker is looking for libraries. Also, the linker script will be printed. You should see it try your directory first tmp/sysroots/qemux86-64/usr/lib/, and then fall through the default ones with the sysroot prefix added and, at the end, the system ones: /lib:/usr/lib. Thanks, Laurentiu _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto