Boost C++ Libraries: Ticket #6494: Using BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG flag ruins date_time library under MinGW https://svn.boost.org/trac10/ticket/6494 <p> I've built static boost libraries under windows (Win7 64) with MinGW 3.20 (32 bit, GCC 4.6.1) with <strong>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG</strong> option and threading=multi link=static runtime-link=static address-model=32 </p> <p> Simple test like </p> <pre class="wiki">#include &lt;iostream&gt; #include &lt;boost/thread/thread.hpp&gt; #include &lt;boost/date_time/posix_time/posix_time.hpp&gt; using namespace std; using namespace boost; void func() { this_thread::sleep(boost::posix_time::milliseconds(5000)); } int main() { thread trd(func); trd.join(); cout &lt;&lt; "wait ok" &lt;&lt; endl; return 0; } </pre><p> When built statically with <strong>date_time</strong> and <strong>thread</strong> libraries. </p> <p> It fails with segfault in date_time library. That happens in ctor of structure simple_time_rep, but I didn't dig too much. I guess the problem is in date_time library. </p> <p> Without flag <strong>BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG</strong> it's going all right with timings and threads. </p> <p> I also tried flags BOOST_HAS_WINTHREADS and _REENTRANT(for MinGW) - that does not affect the case. BOOST_THREAD_USE_LIB was defined (to let it work with static libs). </p> <p> I've tested this for boost <strong>1.48.0</strong> and <strong>1.49.0-beta1</strong>. Neither did work. I asked about this problem in boost mailing lists but got no answer, so I post it as a possible bug. </p> <p> Sincerely, Yana A. Kireyonok </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6494 Trac 1.4.3