Boost logo

Boost :

Subject: Re: [boost] auto-link with gcc/windows
From: Jürgen Hunold (juergen.hunold_at_[hidden])
Date: 2010-07-06 02:34:39

Hi Robert,

On Tuesday, 6. July 2010 00:07:48 you wrote:
> Jürgen Hunold wrote:
> > BOOST_HAS_DECLSPEC is the interesting one.
> > Please find a patch adding two more "#define
> > BOOST_SERIALIZATION_SOURCE" to the sources. This fixed compilation
> > for me when using gcc's symbol visibility and might help here as
> > mingw uses symbol visibility "under the hood" for
> > __declspec(dllimport/-export).
> I'm aware of this "fix". I'm very reluctant to just do it because I don't
> understand why it works or should work.

It works because gcc and msvc have different symbol visibility rules. It seems
to me that msvc works by "accident" or compiler "feature" right now. I've not
taken the time to dig into the MS knowledge base to verify this, though.

> So it's almost certain that if I just do this, It
> will come back to torture me some time just after the next version is
> released.

Well, I discovered this behaviour when trying to fix the now famous #2114

As soons as symbol visibility support is added to the serialization library,
gcc will fail on _all_ platforms without those extra "#defines"

I'm quite short on time, but please find the whole patch adding symbols
visibility support (and fixing #2114 for Boost.Serialization) attached.
This already work for Boost.Test and Beman patched some more libs...



* Dipl.-Math. Jürgen Hunold       ! Ingenieurgesellschaft für 
* voice: ++49 511 262926 57       ! Verkehrs- und Eisenbahnwesen mbH  
* fax  : ++49 511 262926 99       ! Lister Straße 15
* juergen.hunold_at_[hidden]        !
* Geschäftsführer:                ! Sitz des Unternehmens: Hannover
* Prof. Dr.-Ing. Thomas Siefer    ! Amtsgericht Hannover, HRB 56965
* PD Dr.-Ing. Alfons Radtke       !

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