Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] mingw linker problems
From: Ken (ken.appleby_at_[hidden])
Date: 2012-06-23 08:21:05


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net