Boost C++ Libraries: Ticket #3697: Lack of g++ symbol visibility support in boost::system https://svn.boost.org/trac10/ticket/3697 <p> Similar to <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2309" title="#2309: Bugs: Lack of g++ symbol visibility support in Boost.Thread (closed: fixed)">#2309</a> (class symbols) and <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3347" title="#3347: Bugs: Lack of g++ symbol visibility support in boost::asio (closed: worksforme)">#3347</a> (method sybols): </p> <p> If you compile a library which throws boost::system::system_error with </p> <p> g++ -fvisibility=hidden </p> <p> the exception cannot be caught as system_error (but as runtime_error). </p> <p> Using </p> <pre class="wiki">#pragma GCC visibility push(default) #include &lt;boost/system/system_error.hpp&gt; #pragma GCC visibility pop </pre><p> in the library code helps, but it requires a lot of attention. </p> <p> It would be really, really cool if all boost libraries would add visibility to the public classes, see also </p> <p> <a class="ext-link" href="http://gcc.gnu.org/wiki/Visibility"><span class="icon">​</span>http://gcc.gnu.org/wiki/Visibility</a> </p> <p> Thank you for your time! </p> <p> Regards, </p> <p> Roland </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3697 Trac 1.4.3 Jürgen Hunold Tue, 20 Apr 2010 18:55:03 GMT cc set https://svn.boost.org/trac10/ticket/3697#comment:1 https://svn.boost.org/trac10/ticket/3697#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">juergen.hunold@…</span> added </li> </ul> <p> This is essentially <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2114" title="#2114: Patches: Patch for export symbols from shared library (closed: obsolete)">#2114</a> and <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2309" title="#2309: Bugs: Lack of g++ symbol visibility support in Boost.Thread (closed: fixed)">#2309</a> </p> Ticket Beman Dawes Sat, 22 May 2010 12:12:04 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3697#comment:2 https://svn.boost.org/trac10/ticket/3697#comment:2 <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> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/62140" title="Major upgrade to Boost.Config symbol visibility macros for shared ...">[62140]</a>) Major upgrade to Boost.Config symbol visibility macros for shared libraries, based on patches from Jürgen Hunold with mods by Beman Dawes. Upgrade Boost.System to use the new visibility macros. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3697" title="#3697: Bugs: Lack of g++ symbol visibility support in boost::system (closed: fixed)">#3697</a> and provides foundation for fixing 2114, 2309, etc. </p> Ticket