harsha2010/python-geohash

C _geohash extension does not build on Windows

Closed this issue · 3 comments

What steps will reproduce the problem?

Run python setup.py build in a cmd.exe Terminal on a Windows XP machine.

What is the expected output?

A successful build.

What do you see instead?

C:\python-geohash-0.5>python setup.py build
running build
running build_py
running build_ext
building '_geohash' extension
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox 
/MD /W3 /GS- /DNDEBUG -DPYTHON_MODULE=1 -Ic:\python26\include -
Ic:\python26\PC /Tcsrc/
geohash.c /Fobuild\temp.win32-2.6\Release\src/geohash.obj
geohash.c
src/geohash.c(3) : fatal error C1083: Cannot open include file: 'stdint.h': 
No such file or directory
error: command '"C:\Program Files\Microsoft Visual Studio 
9.0\VC\BIN\cl.exe"' failed with exit status 2

What version of the product are you using? On what operating system?

python-geohash 0.5 on Windows XP SP 3 (no Cygwin).

Please provide any additional information below.

Note that even if a 3rd-party stdint.h is installed (e.g. pstdint.h from 
http://www.azillionmonkeys.com/qed/pstdint.h), the build still fails on the 
include of sys/param.h, which is not present on Windows.

If you don't intend Windows to be a supported platform, then please feel 
free to just close this ticket. But you might want to mention the supported 
platforms on the Project Home page.

Original issue reported on code.google.com by wit...@gmail.com on 27 May 2010 at 8:17

It also appears that geohash.c contains variable declarations that are not at 
the top 
of a scope, which Microsoft Visual Studio does not support for C code.

Original comment by wit...@gmail.com on 27 May 2010 at 8:22

I have not thought about MSVC, thank you pointing it. I modified the code. 
Please try 
the trunk code if possible.

Original comment by Hiroaki.Kawai@gmail.com on 29 May 2010 at 4:02

  • Changed state: Started
  • Added labels: OpSys-Windows
Fixed in 0.6. I tested on python 2.6 against Visual Studio 2008 express. 

Original comment by Hiroaki.Kawai@gmail.com on 31 May 2010 at 11:52

  • Changed state: Fixed