Boost C++ Libraries: Ticket #6146: MinGW : Compiling / linking with Boost.Thread static library https://svn.boost.org/trac10/ticket/6146 <p> I compile boost-1.48 with GCC 4.6.1 using MinGW-32 3.10 on Windows XP. I confirm the last comment of <strong>WFrane</strong> in ticket <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4614" title="#4614: Bugs: Unable to statically link thread lib on mingw/win32 (closed: fixed)">#4614</a> : </p> <blockquote class="citation"> <p> @gtoknu: This may be too late for you, but adding <strong>#define BOOST_THREAD_USE_LIB</strong> before the include statements for the boost headers worked for me. I also recompiled the boost libraries after modifying config.hpp in the manner indicated by koradlow in comment 5, but I'm not certain that doing so is necessary. </p> </blockquote> <p> I built BOOST libraries as static ones. </p> <p> Nevertheless I have to explicitly add <strong>-DBOOST_THREAD_USE_LIB</strong> to my project makefile to avoid a lot of warnings like : </p> <pre class="wiki">boost-1.48/thread/win32/thread_heap_alloc.hpp:59:40: warning: inline function 'void* boost::detail::allocate_raw_heap_memory(unsigned int)' declared as dllimport: attribute ignored [-Wattributes] boost-1.48/thread/win32/thread_heap_alloc.hpp:69:39: warning: inline function 'void boost::detail::free_raw_heap_memory(void*)' declared as dllimport: attribute ignored [-Wattributes] </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6146 Trac 1.4.3 Cyril Othenin-Girard <cog@…> Sat, 19 Nov 2011 10:04:28 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6146#comment:1 https://svn.boost.org/trac10/ticket/6146#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> <p> Oups ! Wrong quote from ticket <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4614" title="#4614: Bugs: Unable to statically link thread lib on mingw/win32 (closed: fixed)">#4614</a>. Since I cannot modify this ticket, I will open a new one. </p> Ticket