Compiling Python for Win32

Cory C. Albrecht Cory.C..Albrecht at p98.f112.n480.z2.fidonet.org
Thu Jul 1 16:37:39 EDT 1999


From: coryalbrecht at hotmail.com (Cory C. Albrecht)

Hello all,

I'm trying to compile Python myself, so I can embed it in my own 
programmes. I can compile my own C/C++ files properly, but then linking 
with python15.lib (or with python15.dll to get a fresh import library 
right then and there) produces many undefined references such as the 
following:

Error! E2028: _object near * near spam_system( _object near *, _object 
              near * ) is an undefined reference
Error! E2028: _object near * near SpamError is an undefined reference
Error! E2028: PyMethodDef near SpamMethods[] is an undefined reference
Error! E2044: exported symbol W?spam_system$n(pn$_object$$pn$1$)pn$1$ 
              not found
Error! E2044: exported symbol W?SpamError$npn$_object$$ not found
Error! E2044: exported symbol W?SpamMethods$n[]$PyMethodDef$$ not found

I'm doubting that this is caused by different name-mangling between 
compilers (I use Watcom C/C++ 11.0) since otherwise my other programmes 
would never be able to use the various standard Win32 API DLLs in my 
<windows>\system32 directory.

What I would like is if somebody who has successfully built Python 1.5.2 
using MSVC++ could do the "Export Makefile" command and send me the 
result. A simple text list of the individual source files that make all 
of the Windows versions of the various python executables, libraries and 
DLLs, along with accompanying defines would also be welcome, and either 
will earn somebody my undying thanks. :-)

Thanks in advance, eh!

--
Cory C. Albrecht
http://www.sentex.ca/~cory/




More information about the Python-list mailing list