[gdal-dev] Unable to get multi-platform JAR working for GDAL 2.x
Lander, Steven
steven.lander at rgi-corp.com
Tue May 3 12:44:43 PDT 2016
Even,
That does seem to be the problem; I had already compiled the bindings using SWIG 3.x and the make clean command wasn't clearing everything out completely. I verified the new jar made after running the veryclean command now has the appropriate SWIGDatasetUpcast method just like the windows one does.
This should fix the issue. I really appreciate your help!
Steven D. Lander, Software Engineer
Reinventing Geospatial, Inc
________________________________________
From: Even Rouault <even.rouault at spatialys.com>
Sent: Tuesday, May 3, 2016 1:19:54 PM
To: gdal-dev at lists.osgeo.org
Cc: Lander, Steven
Subject: Re: [gdal-dev] Unable to get multi-platform JAR working for GDAL 2.x
> * Linux builds make
> Dataset_SWIGUpcast no matter what SWIG version I compile with. I have
> verified this by compiling the java swig project, unzipping the Jars, and
> running the GNU strings command on the gdalJNI.class file to see the
> method names in that file.
Here with SWIG 1.3.40 on Linux, I see :
gdal_wrap.cpp:SWIGEXPORT jlong JNICALL Java_org_gdal_gdal_gdalJNI_SWIGDatasetUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
org/gdal/gdal/gdalJNI.java: public final static native long SWIGDriverUpcast(long jarg1);
And with SWIG 2.0.12:
gdal_wrap.cpp:SWIGEXPORT jlong JNICALL Java_org_gdal_gdal_gdalJNI_Dataset_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
org/gdal/gdal/gdalJNI.java: public final static native long Dataset_SWIGUpcast(long jarg1);
Are you sure you generate the bindings with the swig version you think to ?
You can check this by looking at the header of the generated swig/java/gdal_wrap.cpp for example.
If you switch between swig versions, make sure to do a "make veryclean" in swig/java so that bindings get regenerated at the next build attempt.
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list