
On 23/06/2012 01:23, Robert Ramey wrote:
Ken wrote:
Hi,
Basically, the inclusion of boost.serialization code appears to alter the default symbol visibility of the dlls generated by mingw.
Is this a mingw issue only or does it appear on regular VS C++ projects as well?
We don't currently use VS. I have a possible explanation and work-around now. We have been relying on the default behaviour of the gnu linker to export all symbols. boost.archive classes instantiated in our dll are probably specifying function attributes to implicitly export symbols. This appears to change the gnu linker behaviour. From "man ld": "--export-all-symbols If given, all global symbols in the objects used to build a DLL will be exported by the DLL. Note that this is the default if there otherwise wouldn't be any exported symbols. When symbols are explicitly exported via DEF files or implicitly exported via function attributes, the default is to not export anything else unless this option is given. " So using --export-all-symbols replaces the previous behaviour. Thanks for your swift response. Ken