* Thomas Bechtold <[email protected]> schrieb: > Hi, > > i want to cross compile a C-Program (host=i386, target=armel). The > program is: > > ####################### > #include <stdio.h> > #include <glib.h> > > int main() > { > printf("Hello world\n"); > return (0); > } > ####################### > > I have installed the cross-compiler from emdebian testing (gcc 4.4) and > also installed a debian squeeze chroot with armel packages. > When i try to compile my program, i got the following error: > > $ /usr/bin/arm-linux-gnueabi-gcc `pkg-config > --define-variable=prefix=/home/test/armel_devel/usr --libs --cflags > glib-2.0` > /usr/lib/gcc/arm-linux-gnueabi/4.4.5/../../../../arm-linux-gnueabi/bin/ld: > skipping incompatible /home/test/armel_devel/usr/lib/libglib-2.0.so when > searching for -lglib-2.0 > /usr/lib/gcc/arm-linux-gnueabi/4.4.5/../../../../arm-linux-gnueabi/bin/ld: > skipping incompatible /lib/libc.so.6 when searching for /lib/libc.so.6 > /usr/lib/gcc/arm-linux-gnueabi/4.4.5/../../../../arm-linux-gnueabi/bin/ld: > cannot find /lib/libc.so.6 > collect2: ld returned 1 exit status
Of course! pkg-config gives you wrong library pathes. You should use sysroot. cu -- ---------------------------------------------------------------------- Enrico Weigelt, metux IT service -- http://www.metux.de/ phone: +49 36207 519931 email: [email protected] mobile: +49 151 27565287 icq: 210169427 skype: nekrad666 ---------------------------------------------------------------------- Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme ---------------------------------------------------------------------- -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

