Embed+extend+port

Chris Liechti cliechti at gmx.net
Sun May 9 09:24:27 EDT 2004


Vio <vmilitaru at sympatico.ca> wrote in 
news:mailman.370.1084093847.25742.python-list at python.org:

> My story: I played with a little embedded python
> piece of code (python interpreter embedded in wxWidgets app),
> and used SWIG to extend this embedded py interpreter.
> I did it in Linux, after some ironing all builds and runs as expected.

why someone would embedd a python interpreter but write the gui code some 
some other language escapes me, but well ;-)

> On a particularily lazy day, I pasted these same wrapper sources to
> Win32 (cygnus). After fiddling with the Makefile to point in the right
> directions, compilation seems to go ok (give or take a couple of
> warnings). But then the linking step chokes with unfriendly messages 
> like "undefined reference to _PyExit, _Py_Initialize, etc.".
> 
> Could someone tell me what this mean? My guess is that my linker is not 
> pointed at the right Python library, 

right. you need to create an import lib for gcc. thats done with pexports 
and dlltool:

http://docs.python.org/inst/tweak-flags.html#SECTION000622000000000000000

also remember to use -mno-cygwin for gcc if you want to make native win32 
apps with cygwin.
 
> PS I just read on the list some comments that wxWidgets+Python mix is 
> kinda slow. Bummer.

is it too slow for _you_?
there are always people that say something is slow, even if it isn't 
relevant in real world applications...

chris

-- 
Chris <cliechti at gmx.net>




More information about the Python-list mailing list