undefined reference to `vtable for boost::detail::thread_data_base’

版权声明:本文为博主原创文章,未经博主允许不得转载,转载注明来源。

问题(1)

/usr/include/boost/system/error_code.hpp|214|undefined reference to boost::system::generic_category()'|

通过在pro.文件中添加以下命令,是qt能够链接到c++的库

LIBS += -L /usr/lib/x86_64-linux-gnu -lboost_system

问题(2)

undefined reference to `vtable for boost::detail::thread_data_base’ 

通过在工程文件Makefile添加(-lboost_thread) 解决

LIBS          = $(SUBLIBS) -L /usr/lib/x86_64-linux-gnu -lboost_system -L/home/like/Qt5.8.0/5.8/gcc_64/lib -lQt5Core -lpthread -lboost_thread   (其中-lboost_thread  是自己添加)

猜你喜欢

转载自blog.csdn.net/qq_31815513/article/details/79411403