[Proj] Errors compiling proj4 on linux

Martin Desruisseaux martin.desruisseaux at geomatys.fr
Thu May 31 09:20:41 EST 2012


Hello again Calogero

I just committed a patch where I replaced usage of the C/C++ NAN 
constant by usage of the java.lang.Double.NaN constant in the JNI code. 
If you have a chance, could you test the build again with JNI enabled 
please?

For the record, I also updated the test suite in 
http://geoapi.svn.sourceforge.net/svnroot/geoapi/trunk/geoapi-proj4/src/test/java/org/proj4/PJTest.java

     Martin


Le 31/05/12 15:43, Martin Desruisseaux a écrit :
> Le 31/05/12 14:50, Calogero Mauceri a écrit :
>> jniproj.c: In function `Java_org_proj4_PJ_getSemiMajorAxis':
>> jniproj.c:221: error: `NAN' undeclared (first use in this function)
>> jniproj.c: In function `Java_org_proj4_PJ_getSemiMinorAxis':
>> jniproj.c:237: error: `NAN' undeclared (first use in this function)
> Looking on the web, it seem that the NAN constant is not guaranteed to
> be available on every compiler. I guess that for being very strict, I
> should returns the value of the java.lang.Double.NaN field (so we would
> also be sure that it is exactly the value expected by Java). I will try
> a patch.



More information about the Proj mailing list