Boost logo

Boost :

Subject: Re: [boost] bug-sprint #2114, 2 comments
From: Juergen Hunold (juergen.hunold_at_[hidden])
Date: 2009-06-10 04:04:01


Hi !

On Tuesday 09 June 2009 19:15:15 Vladimir Prus wrote:
> Alexander Arhipenko wrote:
> > I have 2 major comment on the updated patch.

> > In this case, all the symbols marked with BOOST_FILESYSTEM_DECL
> > will be exported from foo library.
> > This could easily break foo library's ABI (in case of migration to the
> > newest boost version etc.),
> > so BOOST_SYMBOL_IMPORT should be defined for gcc as empty macro:
> > # define BOOST_SYMBOL_IMPORT.

Oh, I've simply copied this from our own project settings. I've checked
against Qt-4.5 and they use an empty symbol import macro, too.
I'll attach an updated patch to the ticket this evening.

> > The second comment:
> > BOOST_EXCEPTION_EXPORT/IMPORT are intended for re-exporting exceptions
> > from shared library. So, they should be defined for gcc as:
> >
> > # define BOOST_EXCEPTION_EXPORT BOOST_SYMBOL_EXPORT
> > # define BOOST_EXCEPTION_IMPORT BOOST_SYMBOL_EXPORT
> >
> > and not as:
> >
> > # define BOOST_EXCEPTION_EXPORT BOOST_SYMBOL_EXPORT
> > # define BOOST_EXCEPTION_IMPORT BOOST_SYMBOL_IMPORT

That means "__attribute__((visibility("default")))", right ?
Okay, I'll add change the patch accordingly.

> Oh, now I am confused. How exactly those symbols are to be used?
> Say, I declare an exception class in a header -- what modifiers
> should I use? Do we need BOOST_WHATEVER_EXCEPTION_DECL? Maybe
> you can write up some guidance for library authors?

Yeah, me too ;-))
That whole exception export thing is quite a miracle.

Yours,

Jürgen

-- 
* 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]        ! www.ivembh.de
* 
* 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 acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk