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

Last reviewed: February 15, 1995
Article ID: Q83220
The information in this article applies to:
  • Microsoft NMAKE for MS-DOS, versions 1.11, 1.12, 1.13, 1.2, 1.3, and 1.4
  • Microsoft NMAKE for OS/2, versions 1.11, 1.12, 1.13, and 1.21
  • Microsoft NMAKE Utility for Windows NT, versions 1.4 and 1.5

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


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 15, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.