C++ 如何将boost库链接到我的项目?
我已经写了代码C++ 如何将boost库链接到我的项目?,c++,multithreading,qt,boost,boost-thread,C++,Multithreading,Qt,Boost,Boost Thread,我已经写了代码 #include <iostream> #include <boost/thread/thread.hpp> using namespace std; void f1() { cout <<"Hello world, I'm a thread1!"<<endl; } int main() { boost::thread t1(&f1); return 0; } #包括 #包括 使用名称空间std; v
#include <iostream>
#include <boost/thread/thread.hpp>
using namespace std;
void f1()
{
cout <<"Hello world, I'm a thread1!"<<endl;
}
int main()
{
boost::thread t1(&f1);
return 0;
}
#包括
#包括
使用名称空间std;
void f1()
{
coutboost\u系统
是一个用于系统特定功能的boost库。您需要boost\u线程
LIBS += -L/usr/lib/x86_64-linux-gnu -lboost_system -lboost_thread