James Kanze
11/3/2008 12:02:00 PM
On Nov 3, 8:37 am, "Megalo" <m...@z.x> wrote:
> why not make "name mangling" of C++ standard so should be
> possible to call the classes and the functions of C++ from
> other C++ compiler [and other language too]
Because name mangling is only the tip of the iceberg. Different
compilers intentionally try to have different mangling, so that
you get an error at link time, rather than undefined behavior at
runtime. The C++ committee can't really address the issue,
because any layout rules would have to depend on the hardware;
normally (i.e. in the case of C), it is the platform which
defines the API. To date, very few platforms have done this for
C++ (Intel Itanium, I think). For proprietary platforms (e.g.
Solaris, Windows), one can argue that the API is defined as
whatever the owner's own C++ compiler (Sun CC, VC++) does, but
this isn't always well documented.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34