[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 

For the record, I also updated the test suite in 


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