【发布时间】:2013-06-22 09:23:36
【问题描述】:
我正在从 Windows-32 XP 迁移到 Windows 7 64 位,但我的项目构建存在问题。错误出现在第一步 - 创建目录。我尝试了 32 位和 64 位的 MinGW 和 MSYS 品牌。似乎没有人不能调用 md 命令。这是我为本地化问题而创建的非常简单的 Makefile:
all:
md C:\_test\trunk\build\win32
MinGW (mingw-w64's toolchains targetting Win64) 制作:
C:\_tmp>C:\mingw64\bin\mingw32-make.exe
md C:\_test\trunk\build\win32
process_begin: CreateProcess(NULL, md C:\_test\trunk\build\win32, ...) failed.
make (e=2): The system cannot find the file specified.
Makefile:2: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
MSYS (64bit) 制作:
C:_tmp>C:\mingw64\msys\bin\make.exe
md C:\_test\trunk\build\win32
make.exe": md: Command not found
make.exe": *** [all] Error 127
从命令行运行相同的命令没有问题:
md C:\_test\trunk\build\win32
有人可以推荐任何解决方案吗?谢谢。
【问题讨论】:
-
md是 Windows 的cmdshell 中的内置命令。所以,要么把它改成mkdir(然后你可能不得不使用正斜杠(无论如何总是一个好主意)),或者告诉make使用cmd作为它的shell。