[Distutils] Compile Windows64 AMD64
peter.mowry at amd.com
Sat May 19 00:19:54 CEST 2007
So I tried ctypes, and it just worked (without any build issues - in
fact I didn't have to build anything or write any code). Is there any
reason I'd want to write an extend python module (to load my shared
library and run exported functions from it) that compiles with
distutils, instead of just using ctypes? Thanks
From: Mowry, Peter
Sent: Friday, May 18, 2007 4:11 PM
To: 'distutils-sig at python.org'
Subject: Compile Windows64 AMD64
I am trying to compile a python extension for Windows64 using distutils
from "Python 2.5.1 (r251:54863, Apr 18 2007, 09:02:36) [MSC v.1400 64
bit (AMD64)] on win32". My extension basically is just a simple C code
file which does a LoadLibrary (dlopen for unix) of my 64-bit shared
library (dll/so) (and then call one function to test it).
My python extension compiled and ran on unix, but not windows.
Originally it says:
File "C:\Python25\lib\distutils\msvccompiler.py", line 616, in
AttributeError: MSVCCompiler instance has no attribute
Then when I try it after setting env variables DISTUTILS_USE_SDK and
MSSdk (both to "1"), it says:
error: Don't know how to compile demo.C
ditutils doc (dist.pdf) section 11.4 says:
Typically, extension modules need to be compiled with the same compiler
that was used to compile Python. ... The AMD64 and Itanium binaries are
created using the Platform SDK.
I am using Visual Studios 8 normally, but I downloaded the Platform SDK
2003 SP1. I opened the start menu "Set Windows XP x64 Build Environment
(Retail)", and tried building it from there. This made no difference; I
got the same errors.
Not fun at all :-(
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Distutils-SIG