example for using calldll with python2.2

Jeff D. Hamann jeff_hamann at hamanndonald.com
Thu Sep 5 21:55:36 EDT 2002

I've perform evaluations on scripting languages for a scripting language to
replace vba for our work. Python seems to be a little farther ahead when it
comes to calling dlls than perl and I've been trying to get calldll to work
on my win2k machine. I've downloaded a version (not sure which but looks
liek a version for python 2.1) and the install/compile.bat choked.

C:\Python22\calldll>gcc -I../Include -O2 -c calldllmodule.c -o
In file included from ../Include/Python.h:62,
                 from calldllmodule.c:62:
../Include/pyport.h:480: #error "LONG_BIT definition appears wrong for
platform (bad gcc/glibc config?)."

C:\Python22\calldll>dllwrap --dllname calldll.pyd --driver-name gcc --def
calldll.def -o calldll.pyd calldllmodule.o -s --entry
_DllMain at 12 --target=i386-mingw32 -L.. -lpython22
cannot find -lpython22
collect2: ld returned 1 exit status
dllwrap: gcc exited with status 1

is what I got. I have no idea what is going on here. is this required to use
the calldll package? is there a precompiled version (at least I can use)
before I can get the makefile to work?


Jeff D. Hamann
Hamann, Donald & Associates
PO Box 1421
Corvallis, Oregon 97339
jeff_hamann at hamanndonald.com

More information about the Python-list mailing list