Re: [Distutils] Problem compiling Extensions on Win32
On February 4, 2004, Thomas Heller wrote:
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?
You were correct, having installed VC6 only to compile this module from the commandline I hadn't even opened up the VisualStudio... It appears the only thing in the registry is "HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Build System\Components\Platforms\Win32 (x86)\Tools" before you open VisualStudio. Once open the registry fills with everything accept Directories which appear in the registry on closing VisualStudio. Adding my Includes in VisualStudio, I was able to get through the first couple of modules without problem, it died later on when the copiler was passed a -Wall parameter (a bug perhaps?): C:\Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo /Ox /MD /W3 /GX /DNDEBUG -IC:\!OSS\Zope-2.7.0-rc2\bin\include -IC:\!OSS\Zope-2.7.0-rc2\bin\P C /Tcsrc/python-Levenshtein-0.7/Levenshtein.c /Fobuild\temp.win32-2.3\Release\sr c/python-Levenshtein-0.7/Levenshtein.obj -Wall Command line error D2021 : invalid numeric argument '/Wall' error: command '"C:\Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe"' fail ed with exit status 2 I manually executed that compiler command line without the -Wall and the module built and then I was able to complete the compiling by reissuing 'python setup.py build' Thanks again for your help -Garth Northern.CA ===-- http://www.northern.ca Canada's Search Engine
"G D" <garth@utmail.to> writes:
On February 4, 2004, Thomas Heller wrote:
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?
You were correct, having installed VC6 only to compile this module from the commandline I hadn't even opened up the VisualStudio... It appears the only thing in the registry is "HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Build System\Components\Platforms\Win32 (x86)\Tools" before you open VisualStudio. Once open the registry fills with everything accept Directories which appear in the registry on closing VisualStudio.
Python 2.3.3 (but not 2.3.2 or earlier) should have displayed a warning when it finds these incomplete registry entries: self.warn("It seems you have Visual Studio 6 installed, " "but the expected registry settings are not present.\n" "You must at least run the Visual Studio GUI once " "so that these entries are created.")
Adding my Includes in VisualStudio, I was able to get through the first couple of modules without problem, it died later on when the copiler was passed a -Wall parameter (a bug perhaps?):
distutils doesn't pass -Wall to the MSVC compiler. A bug in the setup script? Thomas
participants (2)
-
G D
-
Thomas Heller