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

发布于 2024-12-15 18:13:32 字数 2297 浏览 2 评论 0原文

  • 我将 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 
  • I checked out wxPython and wxWidgets into two directories C:\dev\wx\wxPtyhon and C:\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
  • I successfully build wxWidgets by running:
cd wxwidgets\build\msw
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release

The problem is that when I try to build wxPython, it cannot find 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 

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

萝莉病 2024-12-22 18:13:32

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

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

On Linux I got what seemed like an identical error.
I removed the error in this manner:

  1. I used the find command to get a list of wx-config programs
  2. From the list, I chose a wx-config that seemed right & used
    its full path for WX_CONFIG
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文