Boost C++ Libraries: Ticket #6688: better support for exporting symbols from DLL https://svn.boost.org/trac10/ticket/6688 <p> Currently asio/detail/config.hpp only supports exporting symbols from compilers that supports <span class="underline">declspec (i.e. msvc). In order to support many more compilers, including GCC (and gcc compatibles) and sun studio etc. The config header could be simplified to use boost config's BOOST_SYMBOL_EXPORT/IMPORT macro. </span></p> <p> Patch against trunk is attached. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6688 Trac 1.4.3 arvid@… Thu, 15 Mar 2012 05:54:47 GMT attachment set https://svn.boost.org/trac10/ticket/6688 https://svn.boost.org/trac10/ticket/6688 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">export_symbols.diff</span> </li> </ul> <p> patch to support exporting symbols in compilers other than msvc </p> Ticket arvid@… Sun, 18 Mar 2012 23:15:59 GMT <link>https://svn.boost.org/trac10/ticket/6688#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6688#comment:1</guid> <description> <p> actually. with some more testing on darwin, it turns out there's one more change for this to work with GCC. the io_service::service type is not exported, only some of its member functions. My understanding of MSVC's export semantics is that all type metadata (specifically type_info and vtables) are always exported, whereas on GCC, you have to explicitly export a type for its metadata to be exported. I think the io_service::service type should be exported for this reason (otherwise I get a link error failing to find its type_info, presumably originating from a typeid() call inside an asio header). </p> <p> I'm attaching an updated patch. </p> </description> <category>Ticket</category> </item> <item> <author>arvid@…</author> <pubDate>Sun, 18 Mar 2012 23:16:56 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/6688 https://svn.boost.org/trac10/ticket/6688 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">asio_export.diff</span> </li> </ul> <p> updated patch to also export io_service::service </p> Ticket arvid@… Mon, 19 Mar 2012 03:52:41 GMT <link>https://svn.boost.org/trac10/ticket/6688#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6688#comment:2</guid> <description> <p> for reference, this is the error message I get if I don't export io_service::service </p> <pre class="wiki">Undefined symbols for architecture x86_64: "typeinfo for boost::asio::io_service::service", referenced from: typeinfo for boost::asio::detail::service_base&lt;boost::asio::socket_acceptor_service&lt;boost::asio::ip::tcp&gt; &gt;in setup_transfer.o typeinfo for boost::asio::detail::service_base&lt;boost::asio::deadline_timer_service&lt;libtorrent::ptime, boost::asio::time_traits&lt;libtorrent::ptime&gt; &gt; &gt;in setup_transfer.o ld: symbol(s) not found for architecture x86_64 </pre> </description> <category>Ticket</category> </item> </channel> </rss>