On Nov 22, 2000, "Wolfgang M|ller" <[EMAIL PROTECTED]> wrote:

> Now it would be great, if libtool would automatically determine the
> way symbols are mangled by $(CXX), and then configure some c source to 
> mangle mangle functionnames or another, more appropriate data
> structure into function calls. This way we could use dlopen to open
> c++ libraries. 

> What do you think about that?

I think this is too far out of the scope of libtool.  IMO, the right
way to do this is to export the interface of your library with extern
"C" functions, or through some data structure that can be looked up
using such functions.  Anything else will get you in trouble whenever
you use a different compiler, or a different version of the same
compiler, for the library and the main program.  In fact, you'll find
that very often you'll get in trouble by using different compilers
even if the interface of the library only uses extern "C".  That's
unfortunate, but true, and it will remain so until a standard for name
mangling, internal representation of data and exception handling
becomes widely adopted.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

_______________________________________________
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool

Reply via email to