1

I am trying to cross compile samba server.

./config works just fine, but when I want to build with make the prompt says:

Linking shared library bin/libsmbclient.so.0
/opt/qnx630/host/linux/x86/usr/bin/ntoarm-ld: cannot find -lpthread
collect2: ld returned 1 exit status
make: *** [bin/libsmbclient.so.0] Error 1

Anyone knows a solution?

Markus Heider
  • 11
  • 1
  • 3

2 Answers2

2

had this same problem w/mingw. got libpthreadGC2.a from ftp://sourceware.org/pub/pthreads-win32/dll-latest/lib/x86/, put it in C;\mingw\lib and renamed it to libpthread.a. i didn't know gcc's -l switch means "apprend 'lib' to the front and '.a' to the back" e.g. -lpthread = libpthread.a

-1

Make sure that the pthread library is in the library search path of the linker.

Vijay Mathew
  • 26,737
  • 4
  • 62
  • 93