By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,345 Members | 1,746 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,345 IT Pros & Developers. It's quick & easy.

Embed+extend+port

P: n/a
Vio
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.

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, but could someone confirm/rebute
this? I'm pointing the linker (on win32) to -L"/Python23/libs" where
lives "python23.lib", as presumably I need an equivalent to Linux's
"/usr/local/lib/python2.3/config/libpython2.3.a", so I'm wondering if
I'm pointing at the right place on the win32 side, or even if I'd need
to compile Python on win32 (currently using some precompiled distro on
win32, while I recompiled Py on Linux). In other words, I'd like to do
all my development on Linux, and not have to redo the work on win32
(besides some cut&paste). If I sound like a win32 newbie, well, I also
like like one:)

Cheers,
Vio

PS I just read on the list some comments that wxWidgets+Python mix is
kinda slow. Bummer.

Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Vio <vm*******@sympatico.ca> wrote in
news:ma**************************************@pyth on.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-fl...00000000000000

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 <cl******@gmx.net>

Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.