【发布时间】:2015-04-20 18:32:48
【问题描述】:
我使用以下配置在 xfce4 桌面环境的 linux 上从源代码安装了 wxPython 2.8.12.1:
../configure --prefix=/opt/wx/2.8 --build=i686-pc-linux --disable-precomp-headers --without-opengl --enable-graphics_ctx
结果我得到了以下错误:
dc: <wx._gdi.BufferedPaintDC; proxy of <Swig Object of type 'wxBufferedPaintDC *' at 0x5e3550> >
Traceback (most recent call last):
File "gra.py", line 15, in OnPaint
gc = wx.GCDC(dc)
File "/opt/staff/wxPython-src-2.8.12.1/wxPython/wx/_gdi.py", line 6068, in __init__
_gdi_.GCDC_swiginit(self,_gdi_.new_GCDC(*args))
NotImplementedError: wxGCDC is not available on this platform.
在这行代码的执行过程中:
gc = wx.GCDC(dc)
有什么问题?如何让 wxGCDC 在我的平台上可用?
不幸的是我必须从源代码安装 wxPython(不能使用这个库的预编译版本)。
【问题讨论】:
-
我不知道答案,但你真的应该构建 wxPython 3.0 而不是 2.8,尤其是当你自己构建它时。
-
不,我不能使用 wxPython 3.0,因为没有向后兼容 2.8 版本。如果我使用 wxPython 2.8,我将不得不重写我的应用程序的某些部分。
-
@MindMixer,2.8 已经很老了,也许是时候升级到更新版本了?根据您的应用程序,您甚至可能想尝试使用 wxPython Phoenix。
标签: python linux wxpython wxwidgets