[python-win32] Compiling python functions in a c file on windows

David Hutto smokefloat at gmail.com
Mon Aug 9 09:37:58 CEST 2010


On Sat, Aug 7, 2010 at 8:32 AM, David Hutto <smokefloat at gmail.com> wrote:
> On Fri, Aug 6, 2010 at 11:11 PM, David Hutto <smokefloat at gmail.com> wrote:
>> 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
>>
>
> This is not correction, but stands upon.
> The shoulders of giants, and you know your defiance,
> it is your defiance
>
Ignore this, I was writing a story in another text editor, while
drinking and got confused apparently. Drunk newb said what?


More information about the python-win32 mailing list