[python-win32] Compiling python functions in a c file on windows
David Hutto
smokefloat at gmail.com
Sat Aug 7 05:11:39 CEST 2010
While trying to go through the tutorial in the official python
documentation, I'm encountering a problem on Windows(ubuntu/linux
compiles the same test file fine)
I'm just using a 'dummy' function at this point, so no other errors are thrown:
#include "c:\\Python31\\include\\Python.h"
int main() {
}
When compiling the test file on Visual C++ 2008/9.0 Express it shows the error:
LINK : fatal error LNK1104: cannot open file 'python31_d.lib'
I know that this is the debug lib for my version of python on windows.
I've built the current source tarball, but it seems that it is two
versions down(the one available for install is r312:79149, and the
tarball is r312:79147, which builds the pythoncore fine in debug, but
not in release).
So I have the debug(python31_d.lib), for the tarball version, but not the first.
Compiling python/c on windows is not as easy, when compared to ubuntu,
although I'm sure it's something minor I'm missing(last time was a
toggle box that took me two days to figure out wasn't checked).
So, before I go on a testing rant, do I need to build the debug
pythoncore from the currently used version, not the tarball, or does
it matter(I'm guessing so, because of the syntax error, and a million
unknown character errors I get when trying to use the two down version
on the tarball)?.
This is just to see if their is an easier way(or something simpler
than I thought) to do this. If not, then on to svn checkout.
It seems as though ubuntu would want the python debug file too(however
I have downloaded several packages related to python development that
may have contained this necessary requirement).
TIA,
David
More information about the python-win32
mailing list