Boost C++ Libraries: Ticket #4699: Can't build serialization as a DLL with mingw-w64 https://svn.boost.org/trac10/ticket/4699 <p> Using i686-w64-mingw32-gcc (GCC) 4.5.1 20100702 (prerelease): </p> <pre class="wiki">$ bjam --with-thread --with-filesystem --with-date_time --with-program_options --with-serialization --layout=versioned toolset=gcc target-os=windows variant=release link=shared,static runtime-link=shared threading=multi threadapi=win32 define=BOOST_USE_WINDOWS_H nBuilding the Boost C++ Libraries.nn ...patience... ...found 1415 targets... ...updating 10 targets... gcc.link.dll bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/libboost_serialization-mgw45-mt-1_44.dll.a Creating library file: bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/libboost_serialization-mgw45-mt-1_44.dll.abin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/basic_iarchive.o:basic_iarchive.cpp:(.text+0xcc5): undefined reference to `__imp___ZN5boost13serialization18extended_type_info4findEPKc' bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/basic_iarchive.o:basic_iarchive.cpp:(.text$_ZNSt8_Rb_treeIN5boost7archive6detail19basic_iarchive_impl12cobject_typeES4_St9_IdentityIS4_ESt4lessIS4_ESaIS4_EE16_M_insert_uniqueERKS4_[std::_Rb_tree&lt;boost::archive::detail::basic_iarchive_impl::cobject_type, boost::archive::detail::basic_iarchive_impl::cobject_type, std::_Identity&lt;boost::archive::detail::basic_iarchive_impl::cobject_type&gt;, std::less&lt;boost::archive::detail::basic_iarchive_impl::cobject_type&gt;, std::allocator&lt;boost::archive::detail::basic_iarchive_impl::cobject_type&gt; &gt;::_M_insert_unique(boost::archive::detail::basic_iarchive_impl::cobject_type const&amp;)]+0x22): undefined reference to `__imp___ZNK5boost13serialization18extended_type_infoltERKS1_' bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/basic_iarchive.o:basic_iarchive.cpp:(.text$_ZNSt8_Rb_treeIN5boost7archive6detail19basic_iarchive_impl12cobject_typeES4_St9_IdentityIS4_ESt4lessIS4_ESaIS4_EE16_M_insert_uniqueERKS4_[std::_Rb_tree&lt;boost::archive::detail::basic_iarchive_impl::cobject_type, boost::archive::detail::basic_iarchive_impl::cobject_type, std::_Identity&lt;boost::archive::detail::basic_iarchive_impl::cobject_type&gt;, std::less&lt;boost::archive::detail::basic_iarchive_impl::cobject_type&gt;, std::allocator&lt;boost::archive::detail::basic_iarchive_impl::cobject_type&gt; &gt;::_M_insert_unique(boost::archive::detail::basic_iarchive_impl::cobject_type const&amp;)]+0x76): undefined reference to `__imp___ZNK5boost13serialization18extended_type_infoltERKS1_' bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/basic_iarchive.o:basic_iarchive.cpp:(.text$_ZNSt8_Rb_treeIN5boost7archive6detail19basic_iarchive_impl12cobject_typeES4_St9_IdentityIS4_ESt4lessIS4_ESaIS4_EE16_M_insert_uniqueERKS4_[std::_Rb_tree&lt;boost::archive::detail::basic_iarchive_impl::cobject_type, boost::archive::detail::basic_iarchive_impl::cobject_type, std::_Identity&lt;boost::archive::detail::basic_iarchive_impl::cobject_type&gt;, std::less&lt;boost::archive::detail::basic_iarchive_impl::cobject_type&gt;, std::allocator&lt;boost::archive::detail::basic_iarchive_impl::cobject_type&gt; &gt;::_M_insert_unique(boost::archive::detail::basic_iarchive_impl::cobject_type const&amp;)]+0x176): undefined reference to `__imp___ZNK5boost13serialization18extended_type_infoltERKS1_' bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/basic_oarchive.o:basic_oarchive.cpp:(.text$_ZNSt8_Rb_treeIN5boost7archive6detail19basic_oarchive_impl12cobject_typeES4_St9_IdentityIS4_ESt4lessIS4_ESaIS4_EE16_M_insert_uniqueERKS4_[std::_Rb_tree&lt;boost::archive::detail::basic_oarchive_impl::cobject_type, boost::archive::detail::basic_oarchive_impl::cobject_type, std::_Identity&lt;boost::archive::detail::basic_oarchive_impl::cobject_type&gt;, std::less&lt;boost::archive::detail::basic_oarchive_impl::cobject_type&gt;, std::allocator&lt;boost::archive::detail::basic_oarchive_impl::cobject_type&gt; &gt;::_M_insert_unique(boost::archive::detail::basic_oarchive_impl::cobject_type const&amp;)]+0x22): undefined reference to `__imp___ZNK5boost13serialization18extended_type_infoltERKS1_' bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/basic_oarchive.o:basic_oarchive.cpp:(.text$_ZNSt8_Rb_treeIN5boost7archive6detail19basic_oarchive_impl12cobject_typeES4_St9_IdentityIS4_ESt4lessIS4_ESaIS4_EE16_M_insert_uniqueERKS4_[std::_Rb_tree&lt;boost::archive::detail::basic_oarchive_impl::cobject_type, boost::archive::detail::basic_oarchive_impl::cobject_type, std::_Identity&lt;boost::archive::detail::basic_oarchive_impl::cobject_type&gt;, std::less&lt;boost::archive::detail::basic_oarchive_impl::cobject_type&gt;, std::allocator&lt;boost::archive::detail::basic_oarchive_impl::cobject_type&gt; &gt;::_M_insert_unique(boost::archive::detail::basic_oarchive_impl::cobject_type const&amp;)]+0x76): undefined reference to `__imp___ZNK5boost13serialization18extended_type_infoltERKS1_' bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/basic_oarchive.o:basic_oarchive.cpp:(.text$_ZNSt8_Rb_treeIN5boost7archive6detail19basic_oarchive_impl12cobject_typeES4_St9_IdentityIS4_ESt4lessIS4_ESaIS4_EE16_M_insert_uniqueERKS4_[std::_Rb_tree&lt;boost::archive::detail::basic_oarchive_impl::cobject_type, boost::archive::detail::basic_oarchive_impl::cobject_type, std::_Identity&lt;boost::archive::detail::basic_oarchive_impl::cobject_type&gt;, std::less&lt;boost::archive::detail::basic_oarchive_impl::cobject_type&gt;, std::allocator&lt;boost::archive::detail::basic_oarchive_impl::cobject_type&gt; &gt;::_M_insert_unique(boost::archive::detail::basic_oarchive_impl::cobject_type const&amp;)]+0x17d): more undefined references to `__imp___ZNK5boost13serialization18extended_type_infoltERKS1_' follow bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/shared_ptr_helper.o:shared_ptr_helper.cpp:(.text+0x50): undefined reference to `__imp___ZN5boost13serialization13void_downcastERKNS0_18extended_type_infoES3_PKv' bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/shared_ptr_helper.o:shared_ptr_helper.cpp:(.text+0x107): undefined reference to `__imp___ZN5boost13serialization11void_upcastERKNS0_18extended_type_infoES3_PKv' collect2: ld returned 1 exit status "/srv/build/ccpc/win32-3/mingw-w64/mingw-w32-1.0-bin_x86_64-linux_20100702/bin/i686-w64-mingw32-g++" "-Wl,--out-implib,bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/libboost_serialization-mgw45-mt-1_44.dll.a" -o "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/libboost_serialization-mgw45-mt-1_44.dll" -Wl,-h -Wl,libboost_serialization-mgw45-mt-1_44.dll -shared -Wl,--start-group "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/basic_archive.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/basic_iarchive.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/basic_iserializer.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/basic_oarchive.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/basic_oserializer.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/basic_pointer_iserializer.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/basic_pointer_oserializer.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/basic_serializer_map.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/basic_text_iprimitive.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/basic_text_oprimitive.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/basic_xml_archive.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/binary_iarchive.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/binary_oarchive.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/extended_type_info.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/extended_type_info_typeid.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/extended_type_info_no_rtti.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/polymorphic_iarchive.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/polymorphic_oarchive.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/stl_port.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/text_iarchive.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/text_oarchive.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/void_cast.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/archive_exception.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/xml_grammar.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/xml_iarchive.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/xml_oarchive.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/xml_archive_exception.o" "bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/shared_ptr_helper.o" -Wl,-Bstatic -Wl,-Bdynamic -Wl,--end-group -mthreads ...failed gcc.link.dll bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/libboost_serialization-mgw45-mt-1_44.dll.a bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/libboost_serialization-mgw45-mt-1_44.dll... ...removing bin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi/libboost_serialization-mgw45-mt-1_44.dll.a ...skipped &lt;pstage/lib&gt;libboost_serialization-mgw45-mt-1_44.dll.a for lack of &lt;pbin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi&gt;libboost_serialization-mgw45-mt-1_44.dll.a... ...skipped &lt;pstage/lib&gt;libboost_serialization-mgw45-mt-1_44.dll for lack of &lt;pbin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi&gt;libboost_serialization-mgw45-mt-1_44.dll... ...skipped &lt;pbin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi&gt;libboost_wserialization-mgw45-mt-1_44.dll.a for lack of &lt;pbin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi&gt;libboost_serialization-mgw45-mt-1_44.dll.a... ...skipped &lt;pstage/lib&gt;libboost_wserialization-mgw45-mt-1_44.dll.a for lack of &lt;pbin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi&gt;libboost_wserialization-mgw45-mt-1_44.dll.a... ...skipped &lt;pbin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi&gt;libboost_wserialization-mgw45-mt-1_44.dll for lack of &lt;pbin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi&gt;libboost_serialization-mgw45-mt-1_44.dll.a... ...skipped &lt;pstage/lib&gt;libboost_wserialization-mgw45-mt-1_44.dll for lack of &lt;pbin.v2/libs/serialization/build/gcc-mingw-4.5/release/target-os-windows/threadapi-win32/threading-multi&gt;libboost_wserialization-mgw45-mt-1_44.dll... ...skipped &lt;pstage/lib&gt;libboost_serialization-mgw45-mt.dll.a for lack of &lt;pstage/lib&gt;libboost_serialization-mgw45-mt-1_44.dll.a... ...skipped &lt;pstage/lib&gt;libboost_wserialization-mgw45-mt.dll.a for lack of &lt;pstage/lib&gt;libboost_wserialization-mgw45-mt-1_44.dll.a... ...failed updating 2 targets... ...skipped 8 targets... </pre><p> Version 1.43 worked fine. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4699 Trac 1.4.3 Richard Webb <richard.webb@…> Thu, 30 Sep 2010 11:01:16 GMT <link>https://svn.boost.org/trac10/ticket/4699#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4699#comment:1</guid> <description> <p> Same as <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4375" title="#4375: Bugs: [serialization] Build failures on Mingw (closed: fixed)">#4375</a> ? </p> </description> <category>Ticket</category> </item> <item> <author>Sam Morris <sam@…></author> <pubDate>Thu, 30 Sep 2010 11:05:31 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4699#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4699#comment:2</guid> <description> <p> Looks similar, though the missing symbol names are different. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Sun, 03 Oct 2010 18:09:31 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/4699#comment:3 https://svn.boost.org/trac10/ticket/4699#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket Bryce Adelstein Lelbach Mon, 18 Oct 2010 00:44:02 GMT status changed; cc, resolution set https://svn.boost.org/trac10/ticket/4699#comment:4 https://svn.boost.org/trac10/ticket/4699#comment:4 <ul> <li><strong>cc</strong> <span class="trac-author">Bryce Adelstein Lelbach</span> added </li> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> <p> Duplicate of <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4747" title="#4747: Bugs: mingw linker errors: undefined references (closed: fixed)">#4747</a>. </p> Ticket Bryce Adelstein Lelbach Mon, 18 Oct 2010 01:27:00 GMT status changed; resolution deleted https://svn.boost.org/trac10/ticket/4699#comment:5 https://svn.boost.org/trac10/ticket/4699#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">duplicate</span> </li> </ul> <p> My mistake. This is one of four bugs which seem to all be similiar in nature but not exactly the same. The others are <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4375" title="#4375: Bugs: [serialization] Build failures on Mingw (closed: fixed)">#4375</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4698" title="#4698: Bugs: serialization link errors mingw (closed: fixed)">#4698</a> and <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4699" title="#4699: Bugs: Can't build serialization as a DLL with mingw-w64 (closed: fixed)">#4699</a>. The new XML serialization grammar also seems to not be agreeing with mingw. I'm looking into all of these. </p> Ticket Bryce Adelstein Lelbach Wed, 20 Oct 2010 20:56:28 GMT owner, status changed https://svn.boost.org/trac10/ticket/4699#comment:6 https://svn.boost.org/trac10/ticket/4699#comment:6 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Robert Ramey</span> to <span class="trac-author">Bryce Adelstein Lelbach</span> </li> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">new</span> </li> </ul> <p> Richard, this should be fixed. Please let me know if you're still having problems. </p> Ticket Bryce Adelstein Lelbach Sun, 07 Nov 2010 21:16:42 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4699#comment:7 https://svn.boost.org/trac10/ticket/4699#comment:7 <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> This is definiately fixed. </p> Ticket