Extension with MinGW

Gerhard Häring gerhard.haering at opus-gmbh.net
Thu Dec 5 12:28:35 EST 2002


Andrew Gregory <andrew.gregory at npl.co.uk> wrote:

> Gerhard Häring <gerhard.haering at opus-gmbh.net> wrote in message news:<slrnaursql.1e8.gerhard.haering at haering.opus-gmbh.net>...
>> > But I still get the error message
>> > ImportError: DLL load failed: The specified module could not be found.
>> > Does the mingw-compiled DLL try to load another DLL?
>> 
>> Normally not. But you can use the free Dependency Walker tool
>> (http://www.dependencywalker.com/) to verify that.
> 
> Thanks for the info. Tried dependencywalker:
>  If Borland compiled (--compiler=bcpp) all ok. Listed modules are:
>     Python22.dll
>     Kernel32.dll
>     User32.dll
> 
>  If Mingw32 compiled, listed modules are:
>     C:Python22.DLL
>     Kernel32.dll
>     Msvcrt.dll
> 
> and dependencywalker says that it cannot find C:Python22.dll
> Since it specifically says C:Python22.dll I copied Python22.dll from
> C:\WinNT\System32 to C:\ - but still get error message.

"C:Python22.dll" is definitely wrong. Maybe the libpython22.a file you created
is buggy. I'd try upgrading mingw (IIRC there were some problems in the initial
2.0 versions, but they should be fixed now, at least it works fine for me now).
Alternatively use Cygwin with mingw mode, which works just as well.

I'll send you my libpython22.a file in PM so you can check if this alone makes
any difference.
-- 
Gerhard Häring
OPUS GmbH München
Tel.: +49 89 - 889 49 7 - 32
http://www.opus-gmbh.net/



More information about the Python-list mailing list