C++ 无法在Visual Studio 2012中使用boost::threads
我在VisualStudio2012(CTP 2012年11月)中使用boost::threads时遇到以下错误。我用的是boost 1.53C++ 无法在Visual Studio 2012中使用boost::threads,c++,visual-c++,boost,visual-studio-2012,boost-thread,C++,Visual C++,Boost,Visual Studio 2012,Boost Thread,我在VisualStudio2012(CTP 2012年11月)中使用boost::threads时遇到以下错误。我用的是boost 1.53 1>boost/config/requires_threads.hpp(29): fatal error C1189: #error : "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS" 我在interwebs上
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运行时的建议。(我是,不工作。)然后,对于如何解决这个问题,大家都保持沉默。boost是否正在删除对visual studio的支持???如果禁用语言扩展(即switch/Za),则在visual studio中自动禁用线程。是否确定未定义boost\u disable\u线程?如果是这样,请发布您正在编译的代码。据我所知,我没有发现问题。我禁用了语言扩展(switch/Za),愚蠢地希望编写可移植代码;)请提交一个答案,鼓励在您自己的问题上发布一个。@Zendel:启用
/Za
比您想象的更容易中断–我建议永远不要使用它,并确保您的代码可以通过使用多个编译器进行移植。