Boost C++ Libraries: Ticket #2161: Vc90 managed application fails to initialize when using boost/thread https://svn.boost.org/trac10/ticket/2161 <p> Nicely working application compiled by vc80 stopped working when compiled under vc90. The problem was narrowed down to boost\thread use. To reproduce generate managed "hello world" console app and copy the code below into main. The issue was reported to Mark Levine and Ronald Laerenans at Microsoft but they have not replied... </p> <p> #include "stdafx.h" #pragma managed(push, off) #include &lt;iostream&gt; #include &lt;boost/thread/condition.hpp&gt; #include &lt;boost/thread/mutex.hpp&gt; #pragma managed(pop) </p> <p> class Unmanaged { public: </p> <blockquote> <p> Unmanaged() { </p> <blockquote> <p> std::cout &lt;&lt; <span class="underline">FUNCTION</span> &lt;&lt; std::endl; </p> </blockquote> <p> } </p> </blockquote> <blockquote> <p> ~Unmanaged() { </p> <blockquote> <p> std::cout &lt;&lt; <span class="underline">FUNCTION</span> &lt;&lt; std::endl; </p> </blockquote> <p> } </p> </blockquote> <blockquote> <p> void Wait() { </p> <blockquote> <p> std::cout &lt;&lt; <span class="underline">FUNCTION</span> &lt;&lt; std::endl; boost::mutex::scoped_lock lock(m_mutex); <em>m_condition.wait(lock); </em></p> </blockquote> <p> } </p> </blockquote> <p> private: </p> <blockquote> <p> boost::condition m_condition; boost::mutex m_mutex; </p> </blockquote> <p> }; </p> <p> int main(array&lt;System::String^&gt;<sup> args) { </sup></p> <blockquote> <p> System::Console::<a class="missing wiki">WriteLine</a>(L"Hello World"); Unmanaged unmgd; unmgd.Wait(); return 0; </p> </blockquote> <p> } </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2161 Trac 1.4.3 Anthony Williams Mon, 07 Jun 2010 09:00:12 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2161#comment:1 https://svn.boost.org/trac10/ticket/2161#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">wontfix</span> </li> </ul> <p> Boost.Thread does not work with managed C++ </p> Ticket