[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Writing symbols files for C++ libraries.


On Wed, Apr 08, 2009 at 02:42:16AM +0200, Michael Biebl wrote:
> Daniel Kobras schrieb:
> > Have you used this option successfully with a C++ library? In this case,
> > libtool creates input for the linker option "-retain-symbols-file"
> > rather than a version script like it does with C libs. In my tests,
> > "-retain-symbols-file" only affected static symbols, but didn't touch
> > the list of dynamic symbols. Which is quite pointless for my use case.
> > Is this a known bug/misfeature or might I by doing something wrong here?
> libtool's -export-symbols(-regex) only works with C libraries afaik.
> For C++ libs the only way I know of is to use GCC's visibility support [1].

As Mike noted earlier on in this thread, the troublemaker symbols are
forced to default visibility in the standard headers. Hence,
-fvisibility doesn't gain us much here. I conclude from this thread that
using symbols files for C++ ABIs is pretty much a bad idea at the

Thanks for the input!


Reply to: