Opened 15 years ago

Closed 15 years ago

#3182 closed defect (invalid)

Java bindings do not build properly

Reported by: rst Owned by: Even Rouault
Priority: normal Milestone: 1.7.0
Component: JavaBindings Version: svn-trunk
Severity: normal Keywords: java, swig
Cc:

Description

Number of classes including ColorTable 'missing' from built gdal.jar.

Seems like names get mangled or only partially built by Swig - jar contents example:

Directory of C:\temp\gdal_jar\org\gdal\gdal

12/10/2009 10:26 <DIR> . 12/10/2009 10:26 <DIR> .. 12/10/2009 10:26 9,599 Band.class 12/10/2009 10:26 5,464 Dataset.class 12/10/2009 10:26 3,304 Driver.class 12/10/2009 10:26 2,944 GCP.class 12/10/2009 10:26 15,797 gdal.class 12/10/2009 10:26 471 gdalConstants.class 12/10/2009 10:26 12,062 gdalJNI.class 12/10/2009 10:26 3,027 MajorObject.class 12/10/2009 10:26 4,398 RasterAttributeTable.class 12/10/2009 10:26 635 SWIGTYPE_p_CPLErrorHandler.class 12/10/2009 10:26 615 SWIGTYPE_p_CPLXMLNode.class 12/10/2009 10:26 599 SWIGTYPE_p_double.class 12/10/2009 10:26 623 SWIGTYPE_p_FALSE_IS_ERR.class 12/10/2009 10:26 719 SWIGTYPE_p_f_double_p_q_constchar_p_void int.class 12/10/2009 10:26 595 SWIGTYPE_p_GByte.class 12/10/2009 10:26 655 SWIGTYPE_p_GDALColorTableShadow.class 12/10/2009 10:26 639 SWIGTYPE_p_GDALProgressFunc.class 12/10/2009 10:26 587 SWIGTYPE_p_int.class 12/10/2009 10:26 631 SWIGTYPE_p_OGRLayerShadow.class 12/10/2009 10:26 663 SWIGTYPE_p_p_GDALRasterBandShadow.class 12/10/2009 10:26 595 SWIGTYPE_p_p_int.class 12/10/2009 10:26 2,447 Transformer.class

Clip from the build output:

C:\var\download\GDAL\gdal-svn-stable-2009.10.11\swig>nmake -f makefile.vc java

Microsoft (R) Program Maintenance Utility Version 8.00.50727.762 Copyright (C) Microsoft Corporation. All rights reserved.

del .\setup.ini echo "C:\temp\bld" > .\setup.ini findstr /c:"define GDAL_RELEASE_NAME " ..\gcore\gdal_version.h >> .\set

up.ini

cd java if not exist org\gdal\gdal mkdir org\gdal\gdal cd gdal C:\bin\swigwin-1.3.38\swig.exe -java -c++ -package org.gdal.gdal -outdir

../org/gdal/gdal -I../../include/java -o gdal_wrap.cpp ../../../include/gdal.i

SWIG(1): Warning(125): Use of the include path to find the input file is depreca ted and will not work with ccache. Please include the path when specifying the i nput file. .\swig_lib\..\..\..\include\Band.i(161): Warning(453): Can't apply (IF_ERROR_RET URN_NONE). No typemaps are defined. .\swig_lib\..\..\..\include\Operations.i(172): Warning(453): Can't apply (int nL ist,double *pList). No typemaps are defined. .\swig_lib\..\..\..\include\Operations.i(265): Warning(453): Can't apply (int ob ject_list_count,GDALRasterBandShadow poObjects). No typemaps are defined. .\swig_lib\..\..\..\include\Operations.i(351): Warning(453): Can't apply (double

argout[ANY]). No typemaps are defined.

Change History (2)

comment:1 by rst, 15 years ago

Swig version: swigwin-1.3.38

GDAL source: gdalsvn-stable-20091011.zip

comment:2 by Even Rouault, 15 years ago

Resolution: invalid
Status: newclosed

You're not testing the trunk branch if you use gdalsvn-stable-*.zip, which is a snapshot of the 1.6 tree, where Java bindings are known to be in the not-so-good state state you see.

You want to download the gdalsvn-trunk-*.zip archive instead, where all necessary typemaps have been implemented.

Note: See TracTickets for help on using tickets.