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: Paul Pluzhnikov
Subject: Re: Link to static library from DSO without exporting symbols?
Date: Wed, 27 Sep 2006 21:29:11 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)

"Boris" <boris@gtemail.net> writes:

> Is it possible to link to a static library from a DSO without exporting the 
> symbols in the DSO again?

Sure, but the answer is OS-specific, and you provided no clues.

> 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.

Try "info ld" -> Scripts -> VERSION

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


reply via email to

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