On Wed, 2009-04-29 at 19:59 +0200, Martin Fuzzey wrote: > On Wed, Apr 29, 2009 at 12:27 PM, hoefle marco > <[email protected]> wrote: > > Hello, > > A small part of the application (it consists of several daemons) uses > > the pthread library. > > Without specifying the library I get this: > > > > arm-linux-gnu-gcc -O0 -I/usr/include -c -o ledd.o ledd.c > > . > > . > > ledd.c:(.text+0x139c): undefined reference to `pthread_create' > > . > > Does anybody know how to link against the pthread library in emdebian? > > > > try adding -lpthread to your command line above. > You shouldn't need the -I option either. > > Here's how I copiled usbtest (that needs libpthread): > arm-linux-gnu-gcc -Wall -g -lpthread -o testusb testusb.c > > Martin
Hello Martin, I tried to compile testusb (http://www.linux-usb.org/usbtest/testusb.c) as well as you did (good news, I got the USB driver working): hoe...@wks02-lin:/mnt/ext3_data/projects/hasler/emdebian_eval/testusb$ arm-linux-gnu-gcc -Wall -g -lpthread -o testusb testusb.c In file included from /usr/arm-linux-gnu/include/errno.h:36, from testusb.c:27: /usr/arm-linux-gnu/include/bits/errno.h:25:26: error: linux/errno.h: No such file or directory In file included from /usr/arm-linux-gnu/include/sys/ioctl.h:27, from testusb.c:33: /usr/arm-linux-gnu/include/bits/ioctls.h:24:24: error: asm/ioctls.h: No such file or directory testusb.c:34:32: error: linux/usbdevice_fs.h: No such file or directory testusb.c:60: error: expected specifier-qualifier-list before ‘__u8’ testusb.c: In function ‘is_testdev’: . . . Do I miss something? Don't I have to specify at least the kernel headers? -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

