Windows上的Makefile:无法找到cmd.exe目录

时间:2017-02-15 20:29:20

标签: windows makefile cmd pipe cat

当我尝试在Windows上运行Makefile(使用Cygwin)时,我遇到了一个问题。 我有这行代码:

cat command.bat | "$(cmddir)"

cmddir定义为cmddir := /C/Windows/System32/cmd.exe

现在抛出此错误:

cat command.bat | "/C/Windows/System32/cmd.exe"
/bin/sh: /C/Windows/System32/cmd.exe: No such file or directory

虽然cmd.exe位于C:\Windows\System32

任何提示?

谢谢

2 个答案:

答案 0 :(得分:1)

我不熟悉cygwin。您是否尝试在C(驱动器号)后添加:(双冒号)? 此外,当您执行ls C/Windows/System32时会发生什么?

答案 1 :(得分:1)

当我使用Cygwin时,我只需要调整从/C/Windows/System32/cmd.execygdrive/C/Windows/System32/cmd.exe的cmd.exe路径