Boost logo

Boost :

Subject: [boost] [config] BOOST_SYMBOL_VISIBLE on MinGW
From: Robert Ramey (ramey_at_[hidden])
Date: 2015-04-16 11:07:29

I made adjustments so that the serialization library on Develop branch will
build with default visibilty = hidden. There is a little more to this than
one would think. Basically I used BOOST_SYMBOL_VISIBLE on all "exported"
classes (and their base classes) and BOOST_ARCHIVE_DECL ( defined as either
BOOST_ARCHIVE_IMPORT or BOOST_ARCHIVE_EXPORT) on exported/visible member
functions. This seems to give me what I need in that things build and test
for gcc, clang, MSVC.

EXCEPT for gcc under MinGW. see

The message seems to indicate to me that I should have BOOST_SYMBOL_VISIBLE
on the class declaration - which seemed to resolve similar compilation
errors with GCC on other platforms.

Poking around config/compiler/gcc.hpp and config/plaform/w32.hpp It seems to
me that this scheme things look OK - that is it looks that
BOOST_SYMBOL_VISIBILITY should be defined as

I'm also puzzled by the fact that the linker craps out only on this on

Any help appreciated.

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