0

我正在尝试 在 Windows 7 上使用 MinGW编译库https://github.com/PetterS/SuiteSparse/tree/master/CSparse 。

生成文件内容:

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:

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,但没有任何改变。

谁能告诉我我做错了什么?

4

1 回答 1

1

我还尝试在 cmd.exe 中设置 path=C:\mingw32\bin,但没有任何改变。

就我而言,通过键入这个,您可以使 PATH 变量包含路径“C:\mingw32\bin”。看看这个答案:https ://stackoverflow.com/a/9546345/4776786

在 CMD 中试试这个:

set PATH=%PATH%;C:\mingw32\bin

通过执行该命令,您将该目录添加到当前的 PATH 变量中。

但是,另一方面,为什么你不使用“我的电脑”>“属性”>“高级”>“环境变量”>“路径”?这样做,系统重新启动不会中断您的 PATH。

于 2015-06-11T16:57:02.803 回答