[issue3308] MinGW built extensions do not load (specified procedure cannot be found)

Roger Binns report at bugs.python.org
Mon Jul 7 02:16:22 CEST 2008


New submission from Roger Binns <python at rogerbinns.com>:

My extension (apsw) builds and runs just fine on Linux, Mac and Windows
for Python 2.3, 2.4 and 2.5.  For Linux and Mac Python 2.6 beta 1 and
Python 3.0 beta 1 also work just fine.  However on Windows using MinGW
and Python 2.6 beta 1 and Python 3.0 beta 1 the pyd fails to load
claiming the "specified procedure cannot be found".  The compile/link is
just fine and pexports shows the procedure is present.  

# Compile lines
c:/python26/python setup.py build --compile=mingw32 install
c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -DSQLITE_THREADSAFE=1
-DNDEBUG=1 -DEXPERIMENTAL=1
-DAPSW_USE_SQLITE_AMALGAMATION=\"C:\apsw\sqlite3.c\"
-Ic:\python26\include -Ic:\python26\PC -c apsw.c -o
build\temp.win32-2.6\Release\apsw.o
writing build\temp.win32-2.6\Release\apsw.def
c:\mingw\bin\gcc.exe -mno-cygwin -shared -s
build\temp.win32-2.6\Release\apsw.o
build\temp.win32-2.6\Release\apsw.def -Lc:\python26\libs
-Lc:\python26\PCbuild -lpython26 -lmsvcr90 -o build\lib.win32-2.6\apsw.pyd
# Running
ImportError: DLL load failed: The specified procedure could not be found.
# Pexports
C:\apsw>pexports build\lib.win32-2.6\apsw.pyd
LIBRARY apsw.pyd
EXPORTS
initapsw

When using Python 3.0 things are substantially the same except the init
function is PyInit_apsw.

MinGW was installed using the default configuration with the automated
installer http://sourceforge.net/forum/forum.php?forum_id=817299  The
libmsvcr90.a is part of MinGW found in c:\MinGW\lib

----------
components: Distutils
messages: 69361
nosy: rogerbinns
severity: normal
status: open
title: MinGW built extensions do not load (specified procedure cannot be found)
versions: Python 2.6, Python 3.0

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3308>
_______________________________________


More information about the Python-bugs-list mailing list