[Python-Dev] Static builds on Windows
"Martin v. Löwis"
martin at v.loewis.de
Wed Jul 28 21:04:19 CEST 2004
Thomas Heller wrote:
> Now, shouldn't the definition of this symbol be protected by #ifndef
> Py_NO_ENABLE_SHARED, or is there already a different mechanism (without
> the need to change the source files)?
Perhaps. However, my understanding is that it is, in principle, possible
to provide dynamic loading even if the interpreter is all in a single
static python.exe. IOW, people sometimes claim that you can link against
an .exe, in which case you could have extension modules build for your
static interpreter, which could then be loaded dynamically.
I don't know whether anybody has tried that recently, or whether it is
worth supporting. If not, I would have no problems claiming that dynamic
loading is unavailable for a static build.
As for dynamic detection of the issue: I thought there was a mechanism
somewhere which tries to find out whether an extension module is linked
against the "wrong" .dll. Perhaps that mechanism could be extended to
support static libraries: Find out what the module name is of the module
containing importdl.obj, and refuse loading if the extension module
is linked with a different PE module.
Regards,
Martin
More information about the Python-Dev
mailing list