Article ID: 276593 - Last Review: December 29, 2005 - Revision: 6.0 You receive a "NMAKE : fatal error U1045: spawn failed : Invalid argument" error message when you compile a makefile by using the Microsoft Program Maintenance utilityThis article was previously published under Q276593 Note Microsoft Visual C++ .NET (2002) supports both the managed code
model that is provided by the Microsoft .NET Framework and the unmanaged native
Microsoft Windows code model. The information in this article applies only to
unmanaged Visual C++ code. Note Microsoft Visual C++ 2005 supports both the managed code model that is provided by the Microsoft .NET Framework and the unmanaged native Microsoft Windows code model. On This PageSYMPTOMS When you compile a makefile by using the Microsoft Program
Maintenance utility, Nmake.exe (NMAKE), you may receive the following error
message: NMAKE : fatal error U1045: spawn failed :
Invalid argument CAUSE NMAKE uses the command interpreter to spawn the different
tools that are needed to build the targets. The path to the command interpreter
is found by querying for the value of the ComSpec environment variable. If the
ComSpec environment variable is set incorrectly, you receive the error message
shown in the "Symptoms" section. RESOLUTION To resolve this problem, ensure that the ComSpec
environment variable is set correctly. For Microsoft Windows NT and Microsoft Windows 2000, the command interpreter is Cmd.exe. The ComSpec environment variable should contain the following:
%SYSTEMROOT%\System32\Cmd.exe
To view and modify the ComSpec environment variable in Windows
NT:
%WINDIR%\Command.com
To view the value of the ComSpec environment variable:
To correctly set the ComSpec environment variable:
MORE INFORMATIONSteps to reproduce the behavior in Windows 2000
APPLIES TO
| Article Translations
Audio/Video Resources
|
Back to the top
