wxPython and MinGW - successful compiled, but issues remain, help needed

Dear wxPython people,

I am currently trying to incorporate some scripting language
into a large wxWidgets (not wxPython) program. My first attempts
were successful, I have integrated some sort of python interpreter
and was able to call basic functions of the program using
boost::python modules. However, it was not possible to access
wxWidgets features, e.g., opening a dialog etc.

I have seen an example of this in wxPython/samples/embedded, and
it seems to me that this is what I am looking for. Unfortunately,
my program is written in MinGW/C++ and it is not possible to compile
python/wxPython directly from MinGW.

Recently, a python patch for MinGW has been published:

http://jove.prohosting.com/iwave/ipython/pyMinGW.html

1. I had success compiling python using this patch. Worked out
of the box. [some python extensions did not work things like
bsddb, but I didn't need them...]

2. I had success compiling boost::python using the pyMinGW
version of python. [smaller problems with bjam.exe, a strange
"make" replacement which the boost::people are using. I solved
the issue using a binary.]

3. Finally, I was successful compiling wxPython using the pyMinGW
version of python. wxWidgets had to be compiled with 2.4 compatibility
enabled, and a few things had to be changed in config.py.

4. However, I was unable to launch the wxPython demo, the program crashes
at startup. I tracked it down: It seems that dllInit does not get called
the moment the wxPython module is loaded. As a consequence, a function
called wxSetHandle [I forgot the exact name] is not called.

5. Ironically, the "embedded" example worked. dllInit is not necessary
here, because the wxWidgets dll is initialized before in a wxWidgets
program which embeds wxPython.

Question: Is anyone interested in a MinGW patch for wxPython? I am willing
to share my experience. Issue 4 should be solved, though. Any help would
be greatly appreciated. Those who can help me are invited to contact me
personally, matthias.xgondan@psychologie.uni-regensburg.de [please remove
the x before gondan]

Best wishes,

Matthias Gondan

···

--
Handyrechnung zu hoch? Tipp: SMS und MMS mit GMX
Seien Sie so frei: Alle Infos unter http://www.gmx.net/de/go/freesms

Matthias Gondan wrote:

3. Finally, I was successful compiling wxPython using the pyMinGW
version of python. wxWidgets had to be compiled with 2.4 compatibility
enabled, and a few things had to be changed in config.py.

4. However, I was unable to launch the wxPython demo, the program crashes
at startup. I tracked it down: It seems that dllInit does not get called
the moment the wxPython module is loaded. As a consequence, a function
called wxSetHandle [I forgot the exact name] is not called.

I assume you mean DllMain and wxSetInstance. :wink:

5. Ironically, the "embedded" example worked. dllInit is not necessary
here, because the wxWidgets dll is initialized before in a wxWidgets program which embeds wxPython.

Question: Is anyone interested in a MinGW patch for wxPython? I am willing
to share my experience. Issue 4 should be solved, though. Any help would
be greatly appreciated. Those who can help me are invited to contact me
personally, matthias.xgondan@psychologie.uni-regensburg.de [please remove
the x before gondan]

Yes, I would be interested in at least taking a look. I would also be interested in patches that allow a wxWidgets/wxPython built with mingw to be used by a stock Python from the python.org folks.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Robin Dunn wrote:

Yes, I would be interested in at least taking a look. I would also be interested in patches that allow a wxWidgets/wxPython built with mingw to be used by a stock Python from the python.org folks.

I'm not sure that's possible, though it's pretty annoying. It's a bit hazy now, but I think when I set up a windows box to allow me to build python extensions with MinGW, I needed to do a little trick to the python.org python. See:

http://www.mingw.org/MinGWiki/index.php/Python extensions

-Chris

Hello Matthias,

[...]

3. Finally, I was successful compiling wxPython using the pyMinGW
version of python. wxWidgets had to be compiled with 2.4 compatibility
enabled, and a few things had to be changed in config.py.
[...]
Question: Is anyone interested in a MinGW patch for wxPython? I am willing
to share my experience.
[...]

Yes, I would be very insterested the steps you carried out to
get it working.

best regards,

···

On Thu, 31 Mar 2005 11:18:58 +0200 (MEST), "Matthias Gondan" <matthias-gondan@gmx.de> wrote:

--

Franz Steinhäusler

Project Member of DrPython

http://drpython.sourceforge.net/
http://mitglied.lycos.de/drpython/