u012782377
yi顽童
2014-03-19 06:35

linux 链接动态库时产生如下错误

  • linux

g++ ADS_APIServer.o ../../udt/src/libudt.so ../Commlib/libCommlib.so libADS_APIServer.so -o ADS_APIServer
ADS_APIServer.o: In function soapOpenThread(void*)':
ADS_APIServer.cpp:(.text+0x8b0): undefined reference to
pthread_create'
ADS_APIServer.o: In function main':
ADS_APIServer.cpp:(.text+0xd85): undefined reference to
pthread_create'
ADS_APIServer.cpp:(.text+0xdb1): undefined reference to pthread_create'
ADS_APIServer.cpp:(.text+0xddd): undefined reference to
pthread_create'
ADS_APIServer.cpp:(.text+0xe09): undefined reference to pthread_create'
ADS_APIServer.o:ADS_APIServer.cpp:(.text+0xe38): more undefined references to
pthread_create' follow
../../udt/src/libudt.so: undefined reference to pthread_mutex_trylock'
../Commlib/libCommlib.so: undefined reference to
pthread_mutexattr_settype'
../../udt/src/libudt.so: undefined reference to pthread_key_create'
../Commlib/libCommlib.so: undefined reference to
dlsym'
../Commlib/libCommlib.so: undefined reference to dlerror'
../../udt/src/libudt.so: undefined reference to
pthread_getspecific'
../Commlib/libCommlib.so: undefined reference to pthread_mutexattr_destroy'
../Commlib/libCommlib.so: undefined reference to
pthread_mutexattr_init'
../../udt/src/libudt.so: undefined reference to pthread_key_delete'
../Commlib/libCommlib.so: undefined reference to
dlopen'
../../udt/src/libudt.so: undefined reference to pthread_setspecific'
../Commlib/libCommlib.so: undefined reference to
dlclose'
../../udt/src/libudt.so: undefined reference to `pthread_join'

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答

为你推荐