0

I get the following error using boost::threads in visual studio 2012 (CTP Nov 2012). I'm using 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"

I found advice on the interwebs, to use the multi-threaded c runtime. (I am, doesn't work.) And then there is a vast silence on what to do about this problem. Is boost dropping support for visual studio??

ildjarn
  • 62,044
  • 9
  • 127
  • 211
Zendel
  • 485
  • 3
  • 14
  • Are you sure the BOOST_DISABLE_THREADS is not defined? If so, post the code you're compiling. [Visual Studio support](http://www.boost.org/development/tests/release/developer/thread.html) is not dropped to my knowledge. – Sam Miller Apr 04 '13 at 03:34
  • Found the problem. I had disabled language extensions (switch /Za) in the foolish hope of writing portable code ;) – Zendel Apr 04 '13 at 16:36
  • please submit an answer, [so] encourages posting an [answer](http://stackoverflow.com/questions/how-to-answer) to your own question. – Sam Miller Apr 04 '13 at 16:53
  • @Zendel : Enabling `/Za` breaks more than you would think – I would recommend _never_ using it, and ensuring that your code is portable by using multiple compilers. – ildjarn Apr 04 '13 at 19:31

1 Answers1

0

Threading is automatically disabled in Visual Studio if you disable language extensions (i.e., switch /Za).

Zendel
  • 485
  • 3
  • 14