Opened 13 years ago

Closed 12 years ago

#3697 closed Bugs (fixed)

Lack of g++ symbol visibility support in boost::system

Reported by: rbock@… Owned by: Beman Dawes
Milestone: Boost 1.42.0 Component: system
Version: Boost 1.41.0 Severity: Problem
Keywords: Cc: juergen.hunold@…

Description

Similar to #2309 (class symbols) and #3347 (method sybols):

If you compile a library which throws boost::system::system_error with

g++ -fvisibility=hidden

the exception cannot be caught as system_error (but as runtime_error).

Using

#pragma GCC visibility push(default)
#include <boost/system/system_error.hpp>
#pragma GCC visibility pop

in the library code helps, but it requires a lot of attention.

It would be really, really cool if all boost libraries would add visibility to the public classes, see also

http://gcc.gnu.org/wiki/Visibility

Thank you for your time!

Regards,

Roland

Change History (2)

comment:1 by Jürgen Hunold, 13 years ago

Cc: juergen.hunold@… added

This is essentially #2114 and #2309

comment:2 by Beman Dawes, 12 years ago

Resolution: fixed
Status: newclosed

(In [62140]) 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 #3697 and provides foundation for fixing 2114, 2309, etc.

Note: See TracTickets for help on using tickets.