
Help! NMAKE won't display compile errors
Hello,
I'm writing firmware using a Makefile in Visual Studio, calling the old
C 7.0 compiler "CL.EXE". It works great on one computer, but in setting
up another one with a fresh installation of VC++ and Visual Studio
(Enterprise Edition), when I run the Build function (which calls NMAKE
with my project's makefile), if the compile step encounters errors (i.e.
my program doesn't compile), the errors aren't displayed in the "Build"
output window in Visual Studio. I have things set up as identical on
these two computers as I can think of. If I go to a DOS command line
and manually execute the command under "Build" in the project settings
like so:
d:\c700\bin\NMAKE /a /f FIRMWARE.mak
I will get all errors which CL.EXE encountered, listed explicitly like
so:
Microsoft (R) Program Maintenance Utility Version 1.20
Copyright (c) Microsoft Corp 1988-92. All rights reserved.
cahn.c
Microsoft (R) C/C++ Optimizing Compiler Version 7.00
Copyright (c) Microsoft Corp 1984-1992. All rights reserved.
scale.c(1464) : error C2065: 'asdfasdfasdfa' : undeclared identifier
scale.c(1464) : error C2146: syntax error : missing ';' before
identifier 'I2C_Read'
NMAKE : fatal error U1077: 'D:\C700\BIN\CL' : return code '2'
Stop.
Error executing d:\c700\bin\NMAKE.
The compile errors are listed. This is how it should look in the Build
output window. But when I execute Rebuild All from within Visual
Studio, which calls the exact same command:
d:\c700\bin\NMAKE /a /f FIRMWARE.mak
The results in the Build output window are:
Microsoft (R) Program Maintenance Utility Version 1.20
Copyright (c) Microsoft Corp 1988-92. All rights reserved.
cahn.c
Microsoft (R) C/C++ Optimizing Compiler Version 7.00
Copyright (c) Microsoft Corp 1984-1992. All rights reserved.
NMAKE : fatal error U1077: 'D:\C700\BIN\CL' : return code '2'
Stop.
Error executing d:\c700\bin\NMAKE.
Notice the errors are not listed explicitly. It only says NMAKE failed.
Again, this works properly on one computer, but on the other, when I run
the Rebuild All from within Visual Studio I get no errors listed, but
executing this command in a DOS window on that computer displays the
errors explicitly like they should be in the Output window of Visual
Studio.
Can someone help me figure out what's going on? If so, please email me
at:
Thanks!
Mark.
--
(Please remove "SPAMLESS" from my reply address)
/*---------------------------*/
Mark Malin - Software Engineer
Cahn Instruments - 608.327.6782