2013-04-03 31 views
0

我在visual studio 2012(CTP Nov 2012)中使用boost :: threads獲取以下錯誤。我正在使用boost 1.53。在Visual Studio 2012中無法使用boost :: threads

1>boost/config/requires_threads.hpp(29): fatal error C1189: #error : "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS" 

我在interwebs上找到了使用多線程c運行庫的建議。 (我是,不起作用。)然後,對這個問題該怎麼做還有很大的沉默。是提升放棄支持視覺工作室?

+0

你確定BOOST_DISABLE_THREADS沒有被定義嗎?如果是這樣,發佈你正在編譯的代碼。 [Visual Studio支持](http://www.boost.org/development/tests/release/developer/thread.html)不會丟失我的知識。 – 2013-04-04 03:34:34

+0

發現問題。我已經愚蠢的語言擴展(開關/ ZA)愚蠢的希望編寫便攜式代碼;) – Zendel 2013-04-04 16:36:18

+0

請提交一個答案,[so]鼓勵張貼[答](http://stackoverflow.com/questions/how-to-回答)你自己的問題。 – 2013-04-04 16:53:57

回答

0

如果禁用語言擴展(即開關/ Za),則在Visual Studio中將自動禁用線程。

相關問題