Boost C++ Libraries: Ticket #7864: Boost.Context fails to build with Visual Studio https://svn.boost.org/trac10/ticket/7864 <p> In the 1.53.0 beta1, Boost.Context fails to build: </p> <pre class="wiki"> C:\VC\boost_1_53_0_beta1&gt;b2 --build-type=complete msvc.link.dll bin.v2\libs\context\build\msvc-11.0\debug\threading-multi\boost_context-vc110-mt-gd-1_53.dll Creating library bin.v2\libs\context\build\msvc-11.0\debug\threading-multi\boost_context-vc110-mt-gd-1_53.lib and object bin.v2\libs\context\build\msvc-11.0\ debug\threading-multi\boost_context-vc110-mt-gd-1_53.exp make_i386_ms_pe_masm.obj : error LNK2019: unresolved external symbol __exit referenced in function _make_fcontext LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12 bin.v2\libs\context\build\msvc-11.0\debug\threading-multi\boost_context-vc110-mt-gd-1_53.dll : fatal error LNK1120: 2 unresolved externals &lt;snip&gt; </pre><p> On the boost list, Tom Kent reported: </p> <blockquote> <p> I'm showing the same errors for all visual studio versions I run (VC8, VC9, VC10, and VC11) with 32&amp;64 bit complies. </p> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7864 Trac 1.4.3 olli Mon, 07 Jan 2013 19:15:17 GMT <link>https://svn.boost.org/trac10/ticket/7864#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7864#comment:1</guid> <description> <p> make_i386_ms_pe_masm.obj is compiled from make_i386_ms_pe_masm.asm </p> <p> make_i386_ms_pe_masm.asm references _exit() (from C-library) </p> <p> as the linker output describes symbol </p> <pre class="wiki">__exit </pre><p> (two underscores!) is unknown </p> <p> maybe something with the build-env is wron, especially because the runtime function </p> <pre class="wiki">__DllMainCRTStartup </pre><p> is also unresolved. </p> <p> Maybe you mixed debug with release versions in the build-env? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Mon, 07 Jan 2013 19:18:12 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7864#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7864#comment:2</guid> <description> <p> regression tests in trunk do not show errors?! </p> <p> 'teeks99-1a-win7-32on64' : rev. 82379 from 7.1.2013 msvc 10.0/11.0 -&gt; pass, 'teeks99-1a-win7-64on64' : rev. 82376 from 6.1.2013 msvc 11.0 -&gt; pass, 'id' : rev. 82359 from 4.1.2013 msvc 9.0 -&gt; pass, ... </p> <p> maybe some modifications in the toolchain might cause the linker error?! </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Mon, 07 Jan 2013 19:55:29 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7864#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7864#comment:3</guid> <description> <p> Replying to <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7864" title="#7864: Bugs: Boost.Context fails to build with Visual Studio (closed: fixed)">marshall</a>: </p> <blockquote class="citation"> <p> In the 1.53.0 beta1, Boost.Context fails to build: </p> <pre class="wiki"> C:\VC\boost_1_53_0_beta1&gt;b2 --build-type=complete msvc.link.dll bin.v2\libs\context\build\msvc-11.0\debug\threading-multi\boost_context-vc110-mt-gd-1_53.dll Creating library bin.v2\libs\context\build\msvc-11.0\debug\threading-multi\boost_context-vc110-mt-gd-1_53.lib and object bin.v2\libs\context\build\msvc-11.0\ debug\threading-multi\boost_context-vc110-mt-gd-1_53.exp make_i386_ms_pe_masm.obj : error LNK2019: unresolved external symbol __exit referenced in function _make_fcontext LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12 bin.v2\libs\context\build\msvc-11.0\debug\threading-multi\boost_context-vc110-mt-gd-1_53.dll : fatal error LNK1120: 2 unresolved externals &lt;snip&gt; </pre><p> On the boost list, Tom Kent reported: </p> <blockquote> <p> I'm showing the same errors for all visual studio versions I run (VC8, VC9, VC10, and VC11) with 32&amp;64 bit complies. </p> </blockquote> </blockquote> <p> regression tests in trunk do not show errors?! </p> <p> 'teeks99-1a-win7-32on64' : rev. 82379 from 7.1.2013 msvc 10.0/11.0 -&gt; pass, 'teeks99-1a-win7-64on64' : rev. 82376 from 6.1.2013 msvc 11.0 -&gt; pass, 'id' : rev. 82359 from 4.1.2013 msvc 9.0 -&gt; pass, ... </p> <p> maybe some modifications in the toolchain might cause the linker error?! </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Mon, 07 Jan 2013 21:35:26 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7864#comment:4 https://svn.boost.org/trac10/ticket/7864#comment:4 <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">fixed</span> </li> </ul> <p> fixed </p> Ticket anonymous Tue, 08 Jan 2013 17:43:42 GMT <link>https://svn.boost.org/trac10/ticket/7864#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7864#comment:5</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7864#comment:4" title="Comment 4">olli</a>: </p> <blockquote class="citation"> <p> fixed </p> </blockquote> <p> How was this fixed? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 08 Jan 2013 18:36:01 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7864#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7864#comment:6</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7864#comment:5" title="Comment 5">anonymous</a>: </p> <blockquote class="citation"> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7864#comment:4" title="Comment 4">olli</a>: </p> <blockquote class="citation"> <p> fixed </p> </blockquote> <p> How was this fixed? </p> </blockquote> <p> MSVC adds automatically some runtime support like DllMainCRTStartup if cpp files are compiled for a library. Code from cpp files ware removed so that only assembler files remained. Adding an empty dummy.cpp for MSVC solved the linker error regarding to unresolved symbols. </p> </description> <category>Ticket</category> </item> </channel> </rss>