[Top][All Lists]

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

Re: Feature request: c++ name mangling

From: Alexandre Oliva
Subject: Re: Feature request: c++ name mangling
Date: 23 Nov 2000 00:32:16 -0200
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

On Nov 22, 2000, "Wolfgang M|ller" <address@hidden> 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
Red Hat GCC Developer                  address@hidden,}
CS PhD student at IC-Unicamp        address@hidden,}
Free Software Evangelist    *Please* write to mailing lists, not to me

reply via email to

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