如何在Windows上使用mingw构建wxPython主干?

时间:2011-11-14 18:01:50

标签: wxpython wxwidgets

  • 我检查了wxPython和wxWidgets到两个目录C:\dev\wx\wxPtyhonC:\dev\wx\wxWidgets
mkdir /D c:\dev\wx\
cd c:\dev\wx
git clone https://github.com/wxWidgets/wxPython.git
git clone https://github.com/wxWidgets/wxWidgets.git
  • 我通过运行:
  • 成功构建了wxWidgets
cd wxwidgets\build\msw
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release

问题是,当我尝试构建wxPython时,找不到wx.h

WXWIN=c:\dev\wx\wxWidgets
:: Note c:\dev\wx\wxWidgets\include\wx\wx.h exists !

C:\dev\wx\wxPython>python setup.py COMPILER=mingw32 BUILD_GLCANVAS=0 BUILD_ACTIVEX=0 WX_CONFIG="wx-config" build_ext --inplace  
Preparing CORE...                                                                                                               
Preparing STC...                                                                                                                
Preparing GIZMOS...                                                                                                             
running build_ext                                                                                                               
running build_ext                                                                                                               
building '_core_' extension                                                                                                     
c:\dev\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -DSWIG_TYPE_TABLE=_wxPython_table -DSWIG_PYTHON_OUTPUT_TUPLE -DWXP_USE_THREA
D=1 -UNDEBUG -Iinclude -Isrc -IC:\Python25\include -IC:\Python25\PC -c src/helpers.cpp -o build\temp.win32-2.5\Release\src\helpe
rs.o -O3                                                                                                                        
In file included from src/helpers.cpp:17:0:                                                                                     
include/wx/wxPython/wxPython_int.h:35:19: fatal error: wx/wx.h: No such file or directory                                       
compilation terminated.                                                                                                         
error: command 'gcc' failed with exit status 1 

1 个答案:

答案 0 :(得分:1)

在Linux上我得到了一个看似相同的错误。 我以这种方式删除了错误:

  1. 我使用find命令获取wx-config程序列表
  2. 从列表中,我选择了一个看起来正确的wx-config&用过的 它是WX_CONFIG的完整路径