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

Re: Writing symbols files for C++ libraries.



Daniel Kobras schrieb:
> On Tue, Apr 07, 2009 at 12:15:19PM +0200, Josselin Mouette wrote:
>> Le mardi 07 avril 2009 à 11:57 +0200, Mike Hommey a écrit :
>>> I found nothing better than using a version script. I'm lucky that the
>>> library in question (WebKit) only really exports C symbols, and C++ is only
>>> internal details, so I'm filtering everything that starts with _Z, now.
>> BTW, for such simple things, you can let libtool create the version
>> script for you, using -export-symbols-regex.
> 
> 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].

Cheers,
Michael

[1] http://gcc.gnu.org/wiki/Visibility
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: