"Macro Names Must Be Identifiers" Error in LabWindows™/CVI™

Updated Nov 30, 2020

Reported In


  • LabWindows/CVI

Issue Details

When I try to compile my project in LabWindows™/CVI™, I get the following error, pointed at the first line of the file: error: macro names must be identifiers. 


This error is a result of incorrectly written compiler defines. This may be due to old compiler defines left as artifacts from older versions of CVI, or typos in the defines. To find your compiler defines, navigate to Options » Build Options. Check over the following items to make sure they are correct:
  • All compiler defines must have a 'D' in front of them as described in this help article, e.g. /DWIN32_LEAN_AND_MEAN. Older compilers may have ignored a lack of a D in front of the define, but this will cause this error in newer versions of CVI.
  • There cannot be spaces between the / and the compiler define. Check to make sure any spaces are only between compiler defines, not within them.