Chuck Esterbrook wrote:
I'm trying to figure out if I can use mingw to rebuild wxPython from source, on Win2k with Python 2.2 from python.org.
This page seems to indicate that it's possible:
sebsauvage.net : Writing C/C++ Python extensions without Microsoft Visual C++
But an earlier post about mingw on this list leaves me in doubt:
ActiveState Community - Boosting coder and team productivity with ready-to-use open source languages and tools.
I tried it in the past, but building the wxWindows DLL was terribly slow compileing, and crapped out during the link with an out of virtual memory error. IIRC that box had 256M RAM, but was running win98 so it didn't use it too effectivly...
In theory it should work. (I'd like to live in Theory, it sounds like a nice place!
) You just need to ensure that all the C++ parts (wxWindows, wxPython and any add-ons) are built with the same compiler. wxPython's setup.py will also need some tweaking in order for it to work as currenlty it is assuming VC++ flags and such.
Ultimately my goal is to rebuild a smaller wxPython sans certain classes like wxFTP, wxDb*, etc. Possibly even having a little Python util to help out:
C:> stripwx.py wxFTP "wxDb*"
And then distribute my app as a "normal windows app".
Should I go with VC++ or mingw?
If you can get mingw32 to work there is probably no reason not to use it, other than VC++ producing slightly smaller and faster optimized code on average, from what I hear.
If mingw, do I need to rebuild Python as well?
I don't think so. There is a web page somewhere about making extensions with mingw32 that work with the stock Python.
···
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!