当当前目录在调试文件夹时运行' nmake '

run `nmake` while the current directoy in debug folder

本文关键字:nmake 运行 当前目录 调试 文件夹      更新时间:2023-10-16

我想知道是否有可能从命令提示符运行nmake,而当前目录在调试文件夹中。我发现切换到前一个文件夹只运行nmake,然后回到调试文件夹运行可执行文件是很繁琐的。

debug
release
main.cpp
Makefile 

我在windows 7中使用visual studio 2010。

通过使用nmake option/F,你可以指定你的Makefile的位置:

nmake /F ..Makefile

或者您可以在单行中调用一系列命令:

pushd .. & nmake & popd