help-gplusplus
[Top][All Lists]
Advanced

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

Re: Link to static library from DSO without exporting symbols?


From: skaller
Subject: Re: Link to static library from DSO without exporting symbols?
Date: Fri, 20 Oct 2006 03:50:06 +1000
User-agent: Pan/0.14.2.91 (As She Crawled Across the Table (Debian GNU/Linux))

On Fri, 29 Sep 2006 00:10:00 +0300, Boris wrote:

> Paul Pluzhnikov wrote:
>> "Boris" <boris@gtemail.net> writes:
>>
>> [...]
>>> When I link the Expat XML parser though the DSO
>>> exports all symbols of the Expat XML parser. Is there any option to
>>> tell g++ or the linker not to do this?
>>
>> Assuming Linux, the answer is to use linker version script and
>> explicitly make only your "public" interface visible, hiding
>> everything else.
> 
> Why is this so complicated? 

Design choices. Windows DOES do hierarchical linkage,
which is what you're asking for. Linux uses global linkage.

For C++, global linkage is important, because of uniqueness
requirements (see your other post here).

In fact .. this is due to design faults in C and C++, but thats
another story :)


-- 
John Skaller <skaller at users dot sf dot net>
Try Felix, the successor to C++ http://felix.sf.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]