PRB: U1045: "Lexer Missed a Brace" Caused by Extra Space

ID: Q83220

The information in this article applies to:

SYMPTOMS

An attempt to build a file with NMAKE fails and NMAKE generates one of the following messages. For NMAKE versions 1.11, 1.12, or 1.13:

   fatal error U1045 : Lexer missed a brace

In NMAKE versions 1.2 or later:

   fatal error U1038 : internal error : lexer

   -or-

   fatal error U1059 : missing '}' in dependent

   -or-

   fatal error U1059: syntax error : '}' missing in dependent

CAUSE

A dependent file search path lists multiple directories and the list includes one or more spaces.

RESOLUTION

   Remove any spaces from the search path.

MORE INFORMATION

According to page 660 of the "Microsoft C/C++ Environment and Tools" manual for version 7.0, no spaces are allowed in multiple directory search paths.

For example, if your makefile includes a line like the following, NMAKE generates one of the errors listed above:

   ALL : {c:\test; c:\source }test.exe

To resolve the error, remove the spaces. The following demonstrates the correct method to specify a multiple directory search path:

   ALL : {c:\test;c:\source}test.exe

Additional reference words: 1.11 1.12 1.13 1.20 1.21 1.30 1.40 1.50 KBCategory: kbtool kbprb KBSubcategory: NmakeIss

Last Reviewed: February 15, 1995