undefined symbol: pthread_create (./libpathplan.so) undefined symbol: _ZN12ninebot_algo10AprAlgoLog9instance_E (./libpathplan.so) undefined symbol: _ZN2cv3maxERKNS_3MatES2_ (./libpathplan.so) undefined symbol: _ZN12ninebot_algo10AprAlgoLog8WriteLogE10LEVEL_TYPEPKcS3_z (./libpathplan.so...
仔细想了想了一下,在程序中用到了C++11中的线程std::thread,个人猜测C++11在封装线程std::thread时应当是使用到了pthread,pthread不是linux下的默认的库,也就是在链接的时候,无法找到phread库中线程函数的入口地址,于是链接会失败。 解决方法: 最简单的就是,打开CMakeLists.txt ,在所有用到boost_thread 的后面...
undefined symbol: pthread_create (./libpathplan.so) undefined symbol: _ZN12ninebot_algo10AprAlgoLog9instance_E (./libpathplan.so) undefined symbol: _ZN2cv3maxERKNS_3MatES2_ (./libpathplan.so) undefined symbol: _ZN12ninebot_algo10AprAlgoLog8WriteLogE10LEVEL_TYPEPKcS3_z (./libpathplan.so...
undefined symbol: pthread_create (./libpathplan.so) undefined symbol: _ZN12ninebot_algo10AprAlgoLog9instance_E (./libpathplan.so) undefined symbol: _ZN2cv3maxERKNS_3MatES2_ (./libpathplan.so) undefined symbol: _ZN12ninebot_algo10AprAlgoLog8WriteLogE10LEVEL_TYPEPKcS3_z (./libpathplan.so...
undefined reference to 'pthread_join' 出现这中问题原因: pthread 库不是 Linux 系统默认的库,连接时需要使用静态库 libpthread.a,所以在使用pthread_create()创建线程,以及调用 pthread_atfork()函数建立fork处理程序时,需要链接该库。 问题解决:
undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' /usr/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status [87/122] Compiling C++ object mu/mu.p/mu-cmd.cc.o ninja: build stopped: ...
make Linking CXX executable angkor /usr/bin/ld: CMakeFiles/angkor.dir/main.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2.1' //lib/i386-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: *...
undefined symbol: pthread_create (./cpp_ctp.so)undefined symbol: _ZN15CThostFtdcMdApi15CreateFtdcMdApiEPKcbb (./cpp_ctp.so)undefined symbol: _ZN19CThostFtdcTraderApi13GetApiVersionEv (./cpp_ctp.so)undefined symbol: _ZN15CThostFtdcMdApi13GetApiVersionEv (./cpp_ctp.so)undefined symbol: _...
最近在进行specfem3d程序的测试,在make时总是错误,提示“undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'”: 经国内国外多方查询及尝试,最终发现是makefile文件内容错误,现已解决,现将解决方法记录如下。(本人系统为ubuntu16.04) 在进行查询后得知,主要是makefile中的“flags”缺少“-pthread”,国外主要...