boost 错误:Compiler threading support is not turned on!
最近在redhat 6.3中编程使用boost库出现了个让人郁闷的编译问题,久久不能解决。哪位大牛来给解决下啊 呵呵!
编程环境:
redhat 6.3
g++ 4.4.7
boost 1.48
出现问题:
1./usr/local/include/boost/config/requires_threads.hpp:47:5: error: #error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)"
2./usr/local/include/boost/thread/detail/platform.hpp:67:9: error: #error "Sorry, no boost threads are available for this platform.
这个到底是肿么回事呢? Boost Red?Hat C++
[解决办法]
bjam --with-signals --with-filesystem --with-date_time --with-thread --with-system --build-type=complete threading=multi
[解决办法]
错误提示里面不是说得很清楚吗:
Please set the correct command line options for threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)
你的系统是 linux 的, 在编译器 gcc 选项中加上 -pthread