Boost logo

Boost :

Subject: Re: [boost] [config] BOOST_SYMBOL_VISIBLE on MinGW
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2015-04-17 09:34:38


On 16 Apr 2015 at 8:07, Robert Ramey wrote:

> 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
> __attribute__((__visibility__("default")))
>
> I'm also puzzled by the fact that the linker craps out only on this on
> declaration.
>
> Any help appreciated.

You're second guessing the established pattern for how to do symbol
visibility. The established patterns were chosen for good reasons. In
particular, the established pattern works as expected on Mingw, MSVC
and all other compilers. Per member function overrides are
particularly unwise to do.

Assuming you can't be dissuaded from this path, I'd suggest you
examine very closely indeed the dump of exported symbols from shared
libraries using the nm tool and make very sure they do not export a
brittle mish mash of symbols in a way highly likely to cause
unexpected problems for your users.

Niall

-- 
ned Productions Limited Consulting
http://www.nedproductions.biz/ 
http://ie.linkedin.com/in/nialldouglas/



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk