[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Building user applications with thread library



On Wed, Apr 29, 2009 at 12:27 PM, hoefle marco
<marco.hoefle@nanotronic.ch> 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


Reply to: