Paul Pluzhnikov wrote: > "Boris" <[EMAIL PROTECTED]> 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? If I build a shared library like this: g++ -shared -o libfoo.so foo.o -lbar why doesn't the linker (I'm on Linux) hides automatically all the symbols from libbar? Isn't it safe to assume that libfoo probably wants to get linked to some symbols in libbar but does not want to export these symbols? In my example where I link a shared library to the Expat XML parser I want to make use of some functions from Expat and not create a shared library which among others provides the same functions as Expat does already. What's the rationale of exporting all symbols by default? Boris _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus