[Python-Dev] Static builds on Windows (continued)
"Martin v. Löwis"
martin at v.loewis.de
Wed Oct 5 00:21:20 CEST 2005
> I built pythoncore and python. The resulting python.exe worked fine, but did
> indeed fail when I tried to dynamically load anything (Dialog said: the
> application terminated abnormally)
Not sure what you are trying to do here. In your case, dynamic loading
simply cannot work. The extension modules all link with python24.dll,
which you don't have. It may find some python24.dll, which then gives
conflicts with the Python interpreter that is already running.
So what you really should do is disable dynamic loading entirely. To do
so, remove dynload_win from your project, and #undef
HAVE_DYNAMIC_LOADING in PC/pyconfig.h.
Not sure if anybody has recently tested whether this configuration
actually works - if you find that it doesn't, please post your patches
If you really want to provide dynamic loading of some kind, you should
arrange the extension modules to import the symbols from your .exe.
Linking the exe should generate an import library, and you should link
the extensions against that.
More information about the Python-Dev