Boost C++ Libraries: Ticket #219: Threads not detected in mingw build https://svn.boost.org/trac10/ticket/219 <pre class="wiki">Using boost on Windows 2000 with the mingw compiler. Compiling like this works fine: bjam -sTOOLS=mingw I copy the threaded release-dlls to a relevant place and start using Boost.Thread. My code (which uses Boost.Thread) works fine on Linux. When compiling with mingw, I get a lot of lines like this: In file included from headers/Position.h:10, from main.cpp:7: C:/boost/boost/thread/thread.hpp:17:5: #error Thread support is unavailable! Tested with Boost 1.30.2 and latest CVS as of December 9 2003. If I compile with -DBOOST_HAS_THREADS and -DBOOST_HAS_WINTHREADS Then I get some warnings about the above constants being redefined, but things work fine. I believe that mingw is not recognized as a platform supporting native win32 threads, which is an error, as far as I know. By the way: I tried running "configure" with BOOST_HAS_WINTHREADS=1 as described on http://boost.org/libs/config/config.htm#configuring but that didn't help. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/219 Trac 1.4.3 John Maddock Thu, 11 Dec 2003 11:30:01 GMT <link>https://svn.boost.org/trac10/ticket/219#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/219#comment:1</guid> <description> <pre class="wiki">Logged In: YES user_id=14804 You need to turn on threading support in your compiler - that means using -mthreads on mingw32 I believe. John Maddock </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>tarvin</dc:creator> <pubDate>Thu, 11 Dec 2003 16:27:03 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/219#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/219#comment:2</guid> <description> <pre class="wiki">Logged In: YES user_id=831453 I cannot find a way to turn on threading in a way which boost understands. I want to add "-mthreads -mwindows" to the build flags. I tried using bjam's -sBUILD="release &lt;cxxflags&gt;-mthreads -mwindows" but that didn't work: bjam seems to only pick up the first flag. I have searched for a while but cannot find a way to add more than one g++-flag this way. Anyways, I'm now using bjam -sTOOLS=mingw -sBUILD=release -sGXX="g++ -mthreads -mwindows -march=i686" which results in compile steps like: g++ -mthreads -mwindows -march=i686 -c -Wall -ftemplate-depth-100 -DNDEBUG -DNDEBUG -DBOOST_SIGNALS_NO_LIB=1 -O3 -finline-functions -Wno-inline -I"binoostlibssignalsuild" -I "C:oost" -o "binoostlibssignalsuildlibboost_signals.libmingweleasesignal_base.obj" "C:/boost/libs/signals/build/../src/signal_base.cpp" All looks fine, I should think, but boost still doesn't recognize thread support: I still get the before mentioned errors when building software using Boost.Threads. How does boost detect if threading is available? </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Mon, 15 Dec 2003 13:02:09 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/219#comment:3 https://svn.boost.org/trac10/ticket/219#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> <pre class="wiki">Logged In: YES user_id=14804 I've checked this with the current cvs state (soon to be released), and bjam does insert the required -mthreads argument for Jamfile targets with a &lt;threading&gt;multi requirement. John. </pre> Ticket