error linking with multithreading


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/ ../src/ In function int main()‘:
…/src/ warning: unused variable int res' ../src/ In function int OpenSerialPort()’:
…/src/ 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