我今天在 Firebreath 中发现了一个非常奇怪的错误。我试图编译我的项目,make
在我的构建目录上做一个。我得到了一个巨大的输出,有很多错误。我尝试从头开始运行一个新项目,但出现以下错误:
alucard@hell ~/Documentos/sc/build
> make
[ 1%] Built target FireBreath_Cmake
[ 2%] Building CXX object boost/libs/thread/CMakeFiles/boost_thread.dir/src/tss_null.cpp.o
In file included from /home/alucard/Documentos/sc/firebreath/src/3rdParty/boost/boost/thread/detail/platform.hpp:17:0,
from /home/alucard/Documentos/sc/firebreath/src/3rdParty/boost/boost/thread/detail/config.hpp:20,
from /home/alucard/Documentos/sc/firebreath/src/3rdParty/boost/libs/thread/src/tss_null.cpp:7:
/home/alucard/Documentos/sc/firebreath/src/3rdParty/boost/boost/config/requires_threads.hpp:29:4: error: #error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS"
In file included from /home/alucard/Documentos/sc/firebreath/src/3rdParty/boost/boost/thread/detail/config.hpp:20:0,
from /home/alucard/Documentos/sc/firebreath/src/3rdParty/boost/libs/thread/src/tss_null.cpp:7:
/home/alucard/Documentos/sc/firebreath/src/3rdParty/boost/boost/thread/detail/platform.hpp:67:9: error: #error "Sorry, no boost threads are available for this platform."
make[2]: [boost/libs/thread/CMakeFiles/boost_thread.dir/src/tss_null.cpp.o] Error 1
make[1]: [boost/libs/thread/CMakeFiles/boost_thread.dir/all] Error 2
make: [all] Error 2
我的系统似乎有问题,但如果我尝试以下示例,我不会收到任何错误:
#include <boost/thread.hpp>
int main(int argc, char *argv[]) {
return 0;
}
编译:g++ test.cpp -pthread -lboost_thread
。
任何的想法?