Name

$ExternalSym Compiler Directive

Syntax

{$ExternalSym Identifier}

Scope

Local

Description

The $ExternalSym compiler directive tells C++ Builder that Identifier is an external symbol that should not be defined in the C++ header file (.hpp) it generates for the Pascal unit.

Sometimes a symbol you must define in the Pascal unit is already defined elsewhere in C++ Builder. Use the $ExternalSym compiler directive to prevent C++ Builder from writing the symbol in the .hpp file. Note that the compiler uses the unit name as a namespace name. When you use $ExternalSym, you are telling the compiler that the symbol is defined outside the namespace. Contrast this behavior with the $NoDefine directive, where the symbol is defined in the unit’s namespace.

Example

type
  size_t = LongWord;
  {ExternalSym size_t} {C++ already defines this type}
var
  S: size_t;

See Also

$HppEmit Compiler Directive, $NoDefine Compiler Directive, $NoInclude Compiler Directive
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset