[Python-Dev] Static builds on Windows
theller at python.net
Wed Jul 28 19:32:01 CEST 2004
I'm trying to build a static Python library on Windows.
Obviously this can be done by compiling the sources defining the
Py_NO_ENABLE_SHARED preprocessor symbol.
The resulting executable crashes when trying to load external extension
modules, because it tries to load another Python instance (from
Much better, of course, would be if the executable wouild refuse to load
extension modules, which can be forced by commenting out the definition
of HAVE_DYNAMIC_LOADING in PC/pyconfig.h.
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)?
RCS file: /cvsroot/python/python/dist/src/PC/pyconfig.h,v
retrieving revision 1.26
diff -c -r1.26 pyconfig.h
*** pyconfig.h 10 Feb 2004 16:50:19 -0000 1.26
--- pyconfig.h 28 Jul 2004 17:31:20 -0000
*** 399,406 ****
--- 399,408 ----
/* Define if you have clock. */
/* #define HAVE_CLOCK */
+ #ifndef Py_NO_ENABLE_SHARED
/* Define when any dynamic module loading is enabled */
/* Define if you have ftime. */
More information about the Python-Dev