Pete Becker wrote:
On 2008-02-23 07:14:51 -0500, Juha Nieminen
<nospam@thanks.invalid> said:
If name mangling was standardized, it would greatly increase the
usability of C++ to create shared and precompiled libraries
usable among different compilers.
Name mangling is one of several problems in getting different
compilers to work together. You also need to agree on object
layout, calling conventions, and, perhaps, register usage. These
are all platform specific, so there's no universal solution that
handles all of them.
Precompiled libraries are platform specific. That wasn't the point.
What I meant was that I can create a precompiled or even a
dynamically loadable shared library in C with gcc and use it in
code I'm compiling using icc (or basically any other C compiler for
the same system).
C++ has this problem that a precompiled library created with one
compiler may not be usable with another. In some cases it might not
even be usable with the next version of the *same* compiler! This
is because compilers don't seem to yet agree on which name mangling
convention to use.
interface. "Fixing" that doesn't help, unless you also specify how to
delete[] should be implemented, or virtual inheritance, or...
Nobody wants to do that.