[gdal-dev] Swig Java bindings GDAL 1.5 Windows

Frank Warmerdam warmerdam at pobox.com
Tue Jul 29 16:39:38 EDT 2008


Nidel, Mike wrote:
> I'm building GDAL 1.5 (from the branch) on both Linux and Windows. I
> noticed a difference in the way swig is invoked between the GNUMakefile
> and the makefile.vc. The result is java code that's slightly different
> at first glance but vastly different when you run it (it leads to a
> hotspot crash). I traced the problem to the "-nopgcpp" argument -- this
> causes the signatures of the generated Java functions to change. The
> flag is present in the linux build but not in the makefile.vc for the
> windows build.
> 
> So in my own build I'm adding -nopgcpp to GDAL/swig/makefile.vc for each
> of the java packages, but I wanted to see if, first of all, this makes
> sense, and second of all, perhaps someone else might want to know about
> this and make the same change in the baseline.

Mike,

I fought with this a few months ago and ended up commiting:

   http://trac.osgeo.org/gdal/changeset/14323

Unfortunately, it appears I didn't write up anything in the wiki or a ticket
about the issue so now I can't recall all the details.  But basically, yes,
it seems like it is necessary for the bindings to be generated with -nopgcpp
and this really ought to be in the makefiles used to run swig.

Perhaps you could file a ticket on the issue with your findings, and a pointer
to r14323 suggesting the needed additional changes.

I have a vague recollection this issue may have related to specific versions
of swig.

PS. you may also want to contribute to one or both of:

   http://trac.osgeo.org/gdal/wiki/GdalOgrInJavaBuildInstructions
   http://trac.osgeo.org/gdal/wiki/GdalOgrInJavaBuildInstructionsUnix

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the gdal-dev mailing list