From: Anthony T. <an...@co...> - 2004-07-22 14:20:03
|
I've done quite a bit of embedding with Python using mingw32 and not had any difficulties. I have long since given up the method you are using here, though, so perhaps that method still has its issues. Right now I am simply linking directly. In other words, gcc -o some.dll somefile.o c:\windows\system32\python23.dll for example. That works quite well and you do not have to create an import library or worry about getting that import library correct. You'd think that since this technology is available that it should be possible to write a utility that would create the import library completely given a DLL but that doesn't appear to be the case -- or it exists and I am completely unaware of it. Hopefully the above helps you, though. Romain Behar wrote: > I'm porting an application to the Win32 platform that > uses plugins. One of the plugins is a Python scripting > engine. > > Software versions: > > mingw 3.1.0 (g++ 3.2.3) > MSYS 1.0.9 > Python 2.3.4 > > I could build and link the plugin as a DLL using FAQ's > instructions: > > pexports python23.dll | sed "s/^_//" > python23.def > dlltool -U -d python23.def -l libpython23.a > > The compilation didn't work at once: I first had > 'undefined symbol _imp_Py_NoneStruct' messages. > > After replacing Py_None values in the sources with > Py_BuildValue(""), the linking did complete. > > When the application loads the Python engine plugin, > it says _PyArg_ParseTuple function could not be found > in python23.dll. > > What's wrong? > > Regards, > > Romain > > > > > > __________________________________ > Do you Yahoo!? > Vote for the stars of Yahoo!'s next ad campaign! > http://advision.webevents.yahoo.com/yahoo/votelifeengine/ > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click > _______________________________________________ > MinGW-users mailing list > Min...@li... > > You may change your MinGW Account Options or unsubscribe at: > https://lists.sourceforge.net/lists/listinfo/mingw-users |