#pragma alias
Go Up to Pragma Directives Overview Index
Syntax (See Pseudo-grammar)
Classic Toolchain:
#pragma alias "aliasName" = "substituteName"
Clang Toolchain:
The #pragma alias
directive is not supported for BCC64X and BCC32C compilers. Instead, you can leave a comment record for the linker as follows:
#pragma comment(linker, "/alternatename:<name1>=<name2>")
Description
The #pragma alias
indicates to the linker that two identifier names are equivalent. Both identifiers must be enclosed in quotation marks; otherwise, a W8086 Incorrect use of pragma alias "aliasName"="substituteName" (C++) warning is output.
The aliases are now managed in separate units, by two .obj files, one for Unicode and one for non-Unicode. Both of these .obj files are part of the VCL library.
The aliasName
and the substituteName
are injected into their corresponding .obj file exactly as they are written inside the quotation marks. The linker finds all the references to aliasName
and links them to the substituteName
.
#pragma
alias for managing identifiers that are mangled differently in Delphi and C++Builder.