我安装了Windows版Git(便携式版本),并将"C:/Program Files/Git/bin"
添加到了我的系统路径变量中。当我这样做时,搞砸了我从Mingw-w64安装的产品。
当我运行命令来构建项目(make all
)时,出现此错误:
process_begin: CreateProcess(NULL, echo compiling src/prototype-main.cpp, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [make/targets.make:40: src/prototype-main.o] Error 2
当我从路径变量中删除它时,它又可以正常工作了。那是怎么回事? "Git/bin"
目录中的唯一文件是:
bash.exe
git.exe
sh.exe
答案 0 :(得分:1)
我发现您需要将"cmd"
目录放入路径,而不是"bin"
目录。这对我来说仍然绝对是奇怪的,而且我仍然不知道如果将make
目录放在路径上为什么会搞乱"bin"
。
在适用于Windows的Git便携式版本中,有一个名为"README.portable"
的文件。它告诉您(或者使用git-bash或git-cmd终端)将"cmd"
目录放在路径上并直接使用git
。
如果有人知道make
目录在路径上时"bin"
为何会中断,我仍然想知道发生了什么。
答案 1 :(得分:0)
改为尝试:
PortableGit-2.20.1-64-bit.7z.exe
archive %PATH%
然后您可以查看问题是否仍然存在。