今天我發現了Firebreath的一個非常奇怪的錯誤。我試圖編譯我的項目,在我的build目錄上執行make
。我有一個huge output有很多錯誤。我嘗試運行從從頭開始一個新項目,我得到了這些錯誤:用Firebreath提升奇怪的錯誤
[email protected] ~/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
。
有什麼想法?先謝謝了。