FIX: Custom Build Commands Fail When Built from Command LineLast reviewed: September 19, 1997Article ID: Q150287 |
The information in this article applies to:
SYMPTOMSWhen you build a Microsoft Visual C++ project from the command line with Nmake.exe, the custom build commands you specify in the build settings fail, and cause the build to fail. However, when you build the project within Developer Studio, the commands work correctly. This behavior occurs when you specify multiple build commands for a file or group of files, and specify more than one output file that is created by the build commands.
CAUSEThe problem is caused by a backslash (\) character added to the end of each build command in the .mak file.
RESOLUTIONThere are two possible workarounds:
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Visual C++ version 5.0.
MORE INFORMATIONThis behavior occurs because Developer Studio writes the makefile so the multiple commands are invoked on one command line. This causes the command interpreter (Cmd.exe on Windows NT, and Command.com on Windows 95) to report an error, because the result is not a valid command line. The commands need to be passed on separate command lines, or separated by a command line separator, such as the ampersand (&). Also, because there are multiple output files, the same commands are invoked repeatedly for each output file.
Keywords : vcbuglist400 vcfixlist500 VwbIss kbusage Version : 4.0 4.1 4.2 Platform : NT WINDOWS Issue type : kbbug Solution Type : kbfix |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |