Echelon Neuron C User Manual
Page 48
28
Compiler Directives
directive defines the myToolkit.lib file within the “c:\LonWorks\myProjects”
directory:
#pragma library “$MYPROJ$\myToolkit.lib”
If the environment variable “MYPROJ” is not defined, the linker replaces the
unknown macro with an empty string; it does not issue an error message for
the undefined macro.
The system macros listed in Table 4 are always automatically pre-defined,
and do not need defining in the system environment.
Table 4. System Macros for #pragma library Directive
Macro
Expansion
$LONWORKS$
The local LonWorks directory, generally
c:\LonWorks.
Note that there is no trailing backslash.
$IMG$ $LONWORKS$\Images
$STD$ $LONWORKS$\NeuronC\Libraries
For example, the NodeBuilder Code Wizard automatically adds the following
directive to the base .nc file (the file that corresponds to the device template
.nbdt file):
#ifdef _NEURONC
# ifndef _MODEL_FILE
# ifndef USER_DEFINED_CODEWIZARD_LIB
# pragma library "$IMG$\CodeWizard-3.lib"
# endif // USER_DEFINED_CODEWIZARD_LIB
# endif // _MODEL_FILE
#endif // _NEURONC
You can nest macros up to five times, after which the recursion stops.
You can specify the #pragma library directive up to 19 times. That is, the
compiler can process a total of 19 input libraries during one compilation,
counting all included files and the original source file.
This directive is not supported in model files.
#pragma micro_interface
This pragma is only used with the Microprocessor Interface Program (MIP) or
with ShortStack Micro Server applications. See the
LonWorks
Microprocessor Interface Program (MIP) User's Guide
or the
ShortStack
User’s Guide
for more information.
#pragma names_compatible
This pragma is useful in Neuron C Version 2 (and later) to force the compiler
to treat names starting with SCPT*, UNVT*, UCPT*, SFPT*, and UFPT* as
normal variable names instead of as special symbols to be resolved through
resource files. This list does
not
include names starting with SNVT*.
Disabling the special behavior permits the compiler to accept programs
written using Neuron C Version 1 that declare such names in the program.