X = static 时 项目属性 → C/C++ →代码生成 → 运行库 【多线程调试(/MTd)】
X = share 时 项目属性 → C/C++ →代码生成 → 运行库 【多线程调试 DLL (/MDd)】
验证代码
#include <iostream>
#include <boost/thread/thread.hpp>
void hello()
{
std::cout << "Hello world, I'm a thread!" << std::endl;
}
int main()
{
boost::thread thrd(&hello);
thrd.join();
}