Decorated and Mangled Names

The internal representation of function names and other other symbols in your code may not be the same as the identifier in your source code. The internal names are based on your identifier, but may be decorated and mangled.

Decorated Names
The internal names may be decorated on OS/2 and Windows NT platforms. The decoration is a leading character that represents the linkage convention of the function. A question mark indicates __cdecl linkage, and an underscore indicates __stdcall linkage.

On Windows, the names of functions with __stdcall linkage are followed by a commercial at symbol, @, and a number. The number indicates how many bytes are required for parameters of the function.

Mangled Names
When VisualAge C++ builds from C++ code, it mangles all C++ symbolic names that are not declared with extern "C". Mangling involves adding characters before and after the name to indicate type a number of arguments of a function and its and scope.The scope can indicate the class or namespace of the function. Mangled names are used to resolve references to functions when the function name has be overloaded.

If you specify symbols to export from a DLL, by using build options link(exportList, fileName) or link(export, external_name, ...), you must specify the internal representation of the name.

If you build with option link(map) the link map produced by the build shows symbols in their internal representation.



Static and Dynamic Link Libraries
Calling Conventions


Build Dynamic Link Libraries
Export Symbols from a DLL
Demangle C++ Names
Get Mangled Names for C++ Symbols