Den 2009-08-24 23:53 skrev David Byron:
I'm running into a situation where libtool is exporting something I don't
expect it to. I've attached a tarball that demonstrates this.

This is by design. For the msvc branch, libtool digs through the object
files to get all public symbols and exports those, regardless of any
dllexport decorations.

*snip*

Am I correct to expect only public_func as an export?

Not on all systems, but I think that will happen with gcc/ld though.
I think they will only export dllexported symbols if at least one such
symbol exist. However, this causes some trouble if you e.g. have a
library that is not decorated with dllexport and which uses ltdl as a
convinience library. Since ltdl is decorated with dllexport, only the
ltdl symbols are exported in that case, which of course is not what
you generally want...

 What can I do to
convince libtool to keep function foo hidden?

Use one of the -export-symbols SYMFILE or -export-symbols-regex REGEX
options.

Cheers,
Peter


_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to