how to turn on multi threading BOOST_DISABLE_THREADS

Hi all,

Im trying to use boots 1.67.0 in visual studio on windows to compile the boost thread example but im getting a error that i can not find the issue to. I think the error may be i am missing a #define but im not sure how i can work it out. boost seams to be working fine in till i start using threading. when i downloaded boost i have not run bjam iv just used added the directory to my include and linker setting. Dose any one know how to resolve this ?

the error im getting in VS is:
c:\librarys\boost_1_67_0\boost\config\requires_threads.hpp(29): fatal error C1189: #error: "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS"
MikeyBoy for some reason your comment is not showing up here but i got a email. I have already take googled and found this link. but i am not using gcc as far as can tell from googling it would be Microsoft C/C++ Compiler.

the link:
https://stackoverflow.com/questions/8297652/error-boost-disable-threads

cheers
Which MSVC version are you using?
I am using 2017 15.7.27703.2018 from looking in my apps and features on win 10.

iv been trying to find out how i can stay for sure what compiler i am using through googing
and found that if i run cl.exe but when i run cl.exe it just flashes and disappears.

do you know any other way ?

thanks you
Then you don't need boost::thread. Just use std::thread, from <thread>.
i think i must use boost as im trying to use socket.io++ library which has a dependency for websocket which is requires boost im afraid. other wise yes that would be grate.

socket io ++:
https://github.com/socketio/socket.io-client-cpp

websocket :
https://www.zaphoyd.com/websocketpp/manual/getting-started

https://github.com/zaphoyd/websocketpp/tree/ac5d7ea5af9734de965688b54a7860259887b537
websocketpp uses the standard threading support if _WEBSOCKETPP_CPP11_THREAD_ is defined, which is defined in this case:
 
#if defined(_MSC_VER) && _MSC_VER >= 1800 
(1800 is 2013)
https://github.com/zaphoyd/websocketpp/blob/378437aecdcb1dfe62096ffd5d944bf1f640ccc3/websocketpp/common/thread.hpp#L48

If for some reason you still can't get it to work, see if this helps:
https://stackoverflow.com/questions/1229786/using-boost-thread-headers-with-msvc-language-extensions-disabled
thank you for you help much apresated. i will give this a go in my websocket app. currently im am just using the boost example of threading. I am very interested in why this is not working. can you point in any directions so i can try to get to the bottom of it ?

cheers
Topic archived. No new replies allowed.