无法在Windows 7中执行Makefile [英] Can't execute makefile in Windows 7
问题描述
我正在尝试编译库 https://github.com/PetterS/SuiteSparse/tree/master/CSparse 在Windows 7上使用MinGW.
I'm trying to compile library https://github.com/PetterS/SuiteSparse/tree/master/CSparse with MinGW on Windows 7.
Makefile内容:
Makefile contents:
C:
( cd Lib ; $(MAKE) )
( cd Demo ; $(MAKE) )
all: C cov
library:
( cd Lib ; $(MAKE) )
cov:
( cd Tcov ; $(MAKE) )
clean:
( cd Lib ; $(MAKE) clean )
( cd Demo ; $(MAKE) clean )
( cd Tcov ; $(MAKE) clean )
( cd MATLAB/CSparse ; $(RM) *.o )
( cd MATLAB/Test ; $(RM) *.o )
purge:
( cd Lib ; $(MAKE) purge )
( cd Demo ; $(MAKE) purge )
( cd Tcov ; $(MAKE) purge )
( cd MATLAB/CSparse ; $(RM) *.o *.mex* )
( cd MATLAB/Test ; $(RM) *.o *.mex* )
distclean: purge
# do not install CSparse; use CXSparse instead
install:
# uninstall CSparse: do nothing
uninstall:
我要输入cmd.exe:
I'im typing in cmd.exe:
PS C:\Users\s\Desktop\CSparse> mingw32-make
( cd Lib ; C:/MinGW/bin/mingw32-make )
process_begin: CreateProcess(NULL, ( cd Lib ; C:/MinGW/bin/mingw32-make ), ...) failed.
make (e=2): The system cannot find the file specified.
Makefile:8: recipe for target 'C' failed
mingw32-make: *** [C] Error 2
我的路径变量:
C:\Program Files\PC Connectivity Solution\;C:\watcom-1.3\binnt;C:\watcom-1.3\binw;C:\Program Files\Common Files\Intel\Shared Libraries\redist\ia32\compiler;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\python27\;C:\Python27\Scripts;C:\Program Files\MiKTeX 2.9\miktex\bin\;C:\Program Files\Panda3D-1.8.1\python;C:\Program Files\Panda3D-1.8.1\bin;C:\Program Files\Autodesk\Backburner\;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files\Skype\Phone\;C:\Program Files\MATLAB\R2014a\runtime\win32;C:\Program Files\MATLAB\R2014a\bin;C:\MinGW\bin;
我已经重新启动Windows.我还尝试在cmd.exe中设置path = C:\ MinGW \ bin,但没有任何改变.
I have rebooted Windows already. I also tried to set path=C:\MinGW\bin in cmd.exe, but nothing have changed.
有人可以告诉我我在做什么错吗?
Can anyone tell me what I'm doing wrong?
推荐答案
我还尝试在cmd.exe中设置path = C:\ mingw32 \ bin,但没有任何改变.
I also tried to set path=C:\mingw32\bin in cmd.exe, but nothing have changed.
就我而言,通过键入此命令,您可以使PATH变量包含 only 路径"C:\ mingw32 \ bin".看看这个答案: https://stackoverflow.com/a/9546345/4776786
As far I'm concerned, by typing this you make PATH variable contains only path "C:\mingw32\bin". Have look at this answer: https://stackoverflow.com/a/9546345/4776786
在CMD中尝试以下操作:
Try this instead in CMD:
set PATH=%PATH%;C:\mingw32\bin
通过执行该命令,您可以将该目录添加到当前的PATH变量中.
By executing that command you add that directory to your current PATH variable.
但是,另一方面,为什么不使用我的电脑">属性">高级">环境变量">路径"呢?这样做,系统重新启动不会中断您的PATH.
But, in other hand, why you just don't use "My Computer" > "Properties" > "Advanced" > "Environment Variables" > "Path"? Doing this, system reboot will not interrupt your PATH.
这篇关于无法在Windows 7中执行Makefile的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!