When I run nmake.exe from make I get this error:
Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.
NMAKE : fatal error U1065: invalid option '-'
But I’m not passing in ‘-‘ as an option anyplace.
If I run the same command from outside of make it works correctly.
The problem is that the environment variables
MAKEandMAKEFLAGSare set bymake. These are confusingnmake.exe.To fix this, just prefix your call to
nmake.exewithenv -u MAKE -u MAKEFLAGSExample: