error linking with multithreading

Hi,

when compiling a multithreaded application with the arm-elf-c++ I get an error about an undefined reference to clone within pthread_create().

I link with -lpthread and include pthread.h

here is my compile output… any help would be great.

mike@mike-laptop!myProj:~/myProj/apps/OutSmartHost$ make
make -C lxnet
make[1]: Entering directory /targets/LxNETES/project_digi_me_OutSmart/apps/OutSmartHost/lxnet' arm-elf-g++ -Os -fomit-frame-pointer -Wall -mapcs-32 -mcpu=arm7tdmi -DEMBED -Dlinux -D__linux__ -Dunix -D__uClinux__ -fno-builtin -c -o OutSmartHost.o ../src/OutSmartHost.cc ../src/OutSmartHost.cc: In function int main()‘:
…/src/OutSmartHost.cc:122: warning: unused variable int res' ../src/OutSmartHost.cc: In function int OpenSerialPort()’:
…/src/OutSmartHost.cc:357: warning: unused variable struct termios oldtio' arm-elf-g++ -Wall -elf2flt -L/usr/local/LxNETES-2.3/arm-elf/arm-elf/libm -I../src -I. -o OutSmartHost OutSmartHost.o -lpthread OutSmartHost.elf2flt: In function pthread_create’:
OutSmartHost.elf2flt(.text+0xc50): undefined reference to clone' collect2: ld returned 1 exit status make[1]: *** [OutSmartHost] Error 1 make[1]: Leaving directory /targets/LxNETES/project_digi_me_OutSmart/apps/OutSmartHost/lxnet’
make: *** [lxnet] Error 2