我正在尝试交叉编译samba服务器。
./config运行得很好,但是当我想使用make进行构建时,提示符是这样写的:
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有人知道解决方案吗?
发布于 2013-10-23 22:15:57
和mingw也有同样的问题。从ftp://sourceware.org/pub/pthreads-win32/dll-latest/lib/x86/获取libpthreadGC2.a,将其放在C;\mingw\lib中,并将其重命名为libpthread.a。我不知道gcc的-l开关意思是“把'lib‘放在前面,把'.a’放在后面”,例如-lpthread = libpthread.a
发布于 2011-07-27 17:25:51
确保pthread库位于链接器的库搜索路径中。
https://stackoverflow.com/questions/6842010
复制相似问题