This is proably a dumb noobie question, but hopefully some of you have seen this type of thing before. I'm trying to compile a set of Extensions for a Zope app, I'm using the Python that came with Zope2.7RC2 which is Py 2.3.3 on a Windows system. After setting the system path to include the Zope bin and bin\include directories (where the Python.exe and the header files live), I attempt to compile the extensions by doing the following. python setup.py build -cmingw32 I get a hole bunch of undefined interface type errors (the computer's at home so I'm going by memory) similar to __Inf__PyString undefined, and it ends off with a line about WinMain@16 with that setup terminates. When I try the same thing with MSVC7 (from the .NET 1.1 SDK), I get an error message that Python was compiled with Visual C 6 and modules must be compiled with that compiler. The seemingly odd thing to me is when I try it with MSVC6 Std Ed (starting a new cmd prompt and loading the VC6 .bat file for environment), I get the same error message - which doesn't make sense. I'm a bit confused, is there something else to compiling under windows I'm missing? do I need to be in MSys (I've just been trying from cmd)? Any suggestions greatly appriecated, Cheers -Garth Northern.CA ===-- http://www.northern.ca Canada's Search Engine
"G D"
This is proably a dumb noobie question, but hopefully some of you have seen this type of thing before.
I'm trying to compile a set of Extensions for a Zope app, I'm using the Python that came with Zope2.7RC2 which is Py 2.3.3 on a Windows system.
After setting the system path to include the Zope bin and bin\include directories (where the Python.exe and the header files live), I attempt to compile the extensions by doing the following.
python setup.py build -cmingw32
I get a hole bunch of undefined interface type errors (the computer's at home so I'm going by memory) similar to __Inf__PyString undefined, and it ends off with a line about WinMain@16 with that setup terminates.
I know near to nothing about mingw, so I have no suggestion here.
When I try the same thing with MSVC7 (from the .NET 1.1 SDK), I get an error message that Python was compiled with Visual C 6 and modules must be compiled with that compiler.
which is correct...
The seemingly odd thing to me is when I try it with MSVC6 Std Ed (starting a new cmd prompt and loading the VC6 .bat file for environment), I get the same error message - which doesn't make sense.
We just had this issue - distutils doesn't pick up the usual environment variables. It only reads from the registry. Look into the sources for distutils/msvccompiler.py. On my machine, the directories are in the registry as values of the key HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Build System\Components\Platforms\Win32 (x86)\Directories Is this key present on your machine, and has it 'Include Dirs', 'Library Dirs', and 'Path Dirs' values? Thomas
G D wrote:
python setup.py build -cmingw32
I get a hole bunch of undefined interface type errors (the computer's at home so I'm going by memory) similar to __Inf__PyString undefined, and it ends off with a line about WinMain@16 with that setup terminates.
If these are linking errors, the problem might be that you don't have a gcc-style Python library. See http://bonsai.ims.u-tokyo.ac.jp/~mdehoon/software/python/cygwin.html for details on how to get one.
I'm a bit confused, is there something else to compiling under windows I'm missing? do I need to be in MSys (I've just been trying from cmd)?
Usually I run this from Cygwin's command prompt (using Windows' Python), which works fine. --Michiel. -- Michiel de Hoon, Assistant Professor University of Tokyo, Institute of Medical Science Human Genome Center 4-6-1 Shirokane-dai, Minato-ku Tokyo 108-8639 Japan http://bonsai.ims.u-tokyo.ac.jp/~mdehoon
Michiel Jan Laurens de Hoon schrieb:
G D wrote:
python setup.py build -cmingw32
I get a hole bunch of undefined interface type errors (the computer's at home so I'm going by memory) similar to __Inf__PyString undefined, and it ends off with a line about WinMain@16 with that setup terminates.
If these are linking errors, the problem might be that you don't have a gcc-style Python library. See http://bonsai.ims.u-tokyo.ac.jp/~mdehoon/software/python/cygwin.html for details on how to get one.
... ...
--Michiel.
This is the same what you can find in the documentation http://python.org/doc/current/inst/tweak-flags.html#SECTION00062200000000000... But nobody seems to read it. Maybe the compiler class should check for libpython??.a and print a warning with a link to the documentation. --Rene
python setup.py build -cmingw32
I get a hole bunch of undefined interface type errors (the computer's at home so I'm going by memory) similar to __Inf__PyString undefined, and it ends off with a line about WinMain@16 with that setup terminates.
This is [..] what you can find in the documentation http://python.org/doc/current/inst/tweak-flags.html#SECTION00062200000000000...
But nobody seems to read it. Maybe the compiler class should check for libpython??.a and print a warning with a link to the documentation.
Another possibility would be to include the appropriate libpython??.a with the Windows version of Python, in order to make developing C extensions easier for open-source developers that are using gcc instead of Microsoft's compiler. --Michiel. -- Michiel de Hoon, Assistant Professor University of Tokyo, Institute of Medical Science Human Genome Center 4-6-1 Shirokane-dai, Minato-ku Tokyo 108-8639 Japan http://bonsai.ims.u-tokyo.ac.jp/~mdehoon
participants (4)
-
G D
-
Michiel Jan Laurens de Hoon
-
René Liebscher
-
Thomas Heller