Boost logo

Boost :

Subject: [boost] questions regarding GCC visibility
From: Robert Ramey (ramey_at_[hidden])
Date: 2015-03-31 21:48:09

I made a few changes to simplify code in the serialization library. This
entailed eliminating support for borland compilers, workarounds for
compilers which fail to support partial specialization of template function
and some general clean up. In the course of this effort, I had occasion to
simplify the code which supports Auto linking - and by extension visibility.
Things seemed to go pretty well. Feeling frisky, I added the switch
-fvisibility=hidden to the gcc compile of library. Now applications won't
link for lack of certain symbols. Well, they link and run fin on my machine
here at home- but fail in the test matrix.

Funny thing is:
  doesn't seem to be a problem on my machine
  doesn't seem to occur with all exported symbols - only select ones - often
but not always desctructors

I can switch Jamfile back so it doesn't specify -fvisibility=hidden, but it
seems that I'm really close to being able to generate a smaller, cleaner DLL
which I would prefer to do.

Any constructive suggestions would be appreciated.

On a related note, it seems to me that should be updated
to explain BOOST_SYMBOL_EXPORT and BOOST_SYMBOL_IMPORT which are convenient
for simplifying the auto-linking and visibility functionality.

Robert Ramey

View this message in context:
Sent from the Boost - Dev mailing list archive at

Boost list run by bdawes at, gregod at, cpdaniel at, john at