Defining an NMAKE Macro


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on

The latest version of this topic can be found at Defining an NMAKE Macro.



The macroname is a combination of letters, digits, and underscores (_) up to 1,024 characters, and is case sensitive. The macroname can contain an invoked macro. If macroname consists entirely of an invoked macro, the macro being invoked cannot be null or undefined.

The string can be any sequence of zero or more characters. A null string contains zero characters or only spaces or tabs. The string can contain a macro invocation.

Special characters in macros

Null and undefined macros

Where to define macros

Precedence in macro definitions

Macros and NMAKE