|
From: Christoph G. <cg...@uc...> - 2012-08-30 15:44:57
|
On 8/30/2012 2:25 AM, klo uo wrote: > So I forked then cloned huge Basemap repository with idea to test latest code > > README file says it needs geos library, which README suggest: > > nmake /f makefile.vc MSVC_VER=1500 > > However, error is inevitable almost always and this time Google > suggests that MS does not support C-99 (can't find inttypes.h). > Easiest solution is to copy these: > https://code.google.com/p/msinttypes include files in affected include > folder and change line `#include <inttypes.h>` in platform.h to > `#include "inttypes.h"` so it picks it up from current folder > > That was it, geos compiled and products ended in src subfolder > relative to geos folder: > > inlines.obj > geos.lib > geos_i.exp > geos_i.lib > geos.dll.manifest > geos.pdb > geos.ilk > geos.dll > geos_c_i.exp > geos_c_i.lib > geos_c.dll.manifest > geos_c.pdb > geos_c.ilk > geos_c.dll > > Now, Basemap setup has *nix scenario for GEOS_DIR so I changed setup.py to: > > geos_include_dirs=["C:\\Temp\\basemap\\GEOS-3~1.3\\capi","C:\\Temp\\basemap\\GEOS-3~1.3\\include",numpy.get_include()] > geos_library_dirs=["C:\\Temp\\basemap\\GEOS-3~1.3\\src"] > > after I learned that `python setup.py build" fails if Basemap source > is in path with spaces > > Still no luck, and thought to ask for kind help: > <snip> > > LINK : fatal error LNK1181: cannot open input file 'geos_c.lib' > > error: Command "c:\Program Files\Microsoft Visual Studio > 9.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO > /LIBPATH:C:\Temp\basemap\GEOS-3~1.3\src > /LIBPATH:C:\Python27\libs /LIBPATH:C:\Python27\PCbuild geos_c.lib > geos.lib > /EXPORT:init_geoslib > build\temp.win32-2.7\Release\src/_geoslib.obj > /OUT:build\lib.win32-2.7\_geoslib.pyd > /IMPLIB:build\temp.win32-2.7\Release\src\_geoslib.lib > /MANIFESTFILE:build\temp.win32-2.7\Release\src\_geoslib.pyd.manifest" > failed with exit status 1181 > Try to remove 'geos_c' from the list of libraries in setup.py. Works for me. - libraries=['geos_c','geos'])) + libraries=['geos'])) Christoph |