Hi,
I am trying to compile helloworld for imx6ulevk,but it give link errors:
/home/whz/key/whz_imx6ul_gui/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc -Wall --sysroot=/home/whz/key/whz_imx6ul_gui/tmp/sysroots/x86_64-linux/ -o hello hello.c -L/home/whz/key/whz_imx6ul_gui/tmp/sysroots/x86_64-linux/usr/lib -L/home/whz/key/whz_imx6ul_gui/tmp/sysroots/imx6ulevk/usr/lib/arm-poky-linux-gnueabi/4.9.2 -L/home/whz/key/whz_imx6ul_gui/tmp/work/cortexa7hf-vfp-neon-poky-linux-gnueabi/glibc/2.21-r0/sysroot-destdir/usr/lib -L/home/whz/key/whz_imx6ul_gui/tmp/work/cortexa7hf-vfp-neon-poky-linux-gnueabi/libgcc/4.9.2-r0/gcc-4.9.2/build.arm-poky-linux-gnueabi.arm-poky-linux-gnueabi/libgcc/ -L/home/whz/key/whz_imx6ul_gui/tmp/sysroots/imx6ulevk-tcbootstrap/usr/lib
/home/whz/key/whz_imx6ul_gui/tmp/sysroots/x86_64-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/ld: cannot find crt1.o: No such file or directory
/home/whz/key/whz_imx6ul_gui/tmp/sysroots/x86_64-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/ld: cannot find crti.o: No such file or directory
/home/whz/key/whz_imx6ul_gui/tmp/sysroots/x86_64-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/ld: cannot find crtbegin.o: No such file or directory
collect2: error: ld returned 1 exit status
Note:
At the begining,te error is "Cannot find stdio.h",I copy those include file to cross compile's includelib.Then error become many link error,so I use the -L option to tell compile where is those lib.But,even I add another "-L" where have file "crt1.o",it also have this error.What can I do?
Thank you!
This may help you.
Hi bobking
It's a linux library missing issue, refer below link, It may hope full for you.
http://stackoverflow.com/questions/6329887/compiling-problems-cannot-find-crt1-o
Regards,
Aravinth
Hi bobking
In your imx6 file system library may be in different locations. so in Qt - sysroot option you don't mention any location. keep it empty. This problem may solved.
Regards,
Aravinth
Hi aravinthkumar jayaprakasam:
I tryed to remove "--sysroot" option,but,it still have this 3 link error.