SIP Makefile失败(gnuwin和mingw)

For*_*ren 2 mingw makefile gnuwin32 python-2.7 python-sip

我已经下载到SIP模块为Python 2.7,创造了一个Makefile文件,并试图make与makefile文件目录的命令,但我得到这个错误:

Makefile:3: recipe for target 'all' failed
mingw32-make[10]: *** [all] Error 2
mingw32-make[10]: Leaving directory 'D:/Users/myLogin/Downloads/python/sip-4.14.5'
Run Code Online (Sandbox Code Playgroud)

我和Gnuwin和mingw32都犯了这个错误.所以我现在不知所措.任何的想法?

Rei*_*eek 10

如果使用python configure.py,生成的Makefiles实际上是nmakemakefile.nmake是微软相当于make.nmake如果已安装,则可以通过在Visual Studio命令提示符中调用来运行它.

对于构建mingw,您必须在创建makefile时指示您要使用该特定平台,如下所示:

python configure.py --platform win32-g++
Run Code Online (Sandbox Code Playgroud)

之后,调用make工作正常.


make关于在nmakemakefile 上运行时会发生什么的一些细节.生成的nmake文件以以下行开头:

all:
    cd sipgen
    $(MAKE)
    @cd ..
    cd siplib
    $(MAKE)
    @cd ..
Run Code Online (Sandbox Code Playgroud)

因为每一行上的每个命令都是在一个新shell中执行的,所以结果cd sipgen实际上是无效的.然后,make在当前目录中再次调用 - 这会导致无限的make调用递归循环.在[10]你的错误信息表明它是在递归的10级.我想那是你按下的那一刻Ctrl- C:-)