[Shapelib] compile error on Windows

Jeff McKenna jmckenna at gatewaygeomatics.com
Mon Jul 10 09:47:00 PDT 2017


Hi all,

I am in the process of upgrading from Shapelib 1.3.0 to 1.4.0 on 
Windows; I had no problems using cmake to compile 1.4.0, however I also 
need to compile the utilities from the /contrib directory.  As I don't 
see how to use cmake for that directory, I modified /contrib/makefile.vc 
and using Visual Studio 2012 I received this error:

         cl /Ox /MD /nologo /I.. 
/ID:\build\mapserver-buildkit-2012\shapelib-1.4.0\build\install\include 
/ID:\build\mapserver-buildkit-2012\proj-4.9.3\src  /D_LITTLE_ENDIAN 
-DPROJ4 /c shpcat.c shpgeo.c
shpcat.c
shpgeo.c
shpgeo.c(898) : error C2065: 'NAN' : undeclared identifier
shpgeo.c(899) : error C2065: 'NAN' : undeclared identifier
shpgeo.c(909) : error C2065: 'NAN' : undeclared identifier
shpgeo.c(910) : error C2065: 'NAN' : undeclared identifier
shpgeo.c(1021) : error C2065: 'NAN' : undeclared identifier
shpgeo.c(1022) : error C2065: 'NAN' : undeclared identifier
Generating Code...
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual 
Studio 11.0\VC\BIN\cl.EXE"' : return code '0x2'
Stop.


Please let me know if there is another way to compile the contrib 
utilities.  thanks,

-jeff




-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/







More information about the Shapelib mailing list