macros global Miscellaneous Build Option (C++)

Syntax: Default:
macros(global[, yes])
macros(global, no)
macros(global, no)

This option controls whether the associated C++ source files contain global or local macros.

Set macros global to yes if the source contains macros that apply to the whole project.

Set macros global to no if all macros in the source are local to the file that contains them. This is the default setting.

This option is usually applied to files that are named as sources in the configuration file, and would be included by other sources on a traditional compiler. If such files define macros, you should apply macros(global) to them.

Source files to which macros(global) applies are called macro sources. Macro sources are effectively ordered by their appearance in the configuration file.

VisualAge C++ does not follow the standard C++ rules of scope for preprocessor macros that are declared in macro sources. These macros are visible in all other macro sources that are listed subsequently in the configuration file. Macros that are defined in macro sources are visible in all source files that are not macro sources, regardless of where such source files are listed in the configuration file.

The C compiler follows standard C rules for scope and the processing of #include preprocessor directives.



Incremental C++ Builds
C++ Source Files and Source Regions
Macros in C++ Source Files


Set Build Options
Build
Convert Included Source Files to Primary Source Files


Miscellaneous Build Options
Miscellaneous Build Options