[gdal-dev] Java bindings build issue

Ari Jolma ari.jolma at tkk.fi
Wed Jun 17 10:37:52 EDT 2009


Stefan Moebius kirjoitti:
> swig -Wall -I../include -I../include/java -I../include/java/docs 
> -outdir "org/gdal/gdal" -package "org.gdal.gdal"  
> -I/home/devbuild/gdal-1.7
>  -c++ -java -o gdal_wrap.cpp gdal.i
> ../include/cpl.i:EOF: Error: Missing #endif for conditional starting 
> on line 214
> make: *** [gdal_wrap.cpp] Error 1
>
> Any ideas? 
> The swig version is 1.3.29.

hmm, at least for Perl all is (almost) well:

swig -Wall -I../include -I../include/perl -I../include/perl/docs 
-DPERL_CPAN_NAMESPACE -I -c++ -perl -o gdal_wrap.cpp gdal.i
..\include\gdal.i(705): Warning(322): Redundant redeclaration of 
'GeneralCmdLineProcessor',
..\include\ogr.i(1818): Warning(322): previous declaration of 
'GeneralCmdLineProcessor'.
swig -Wall -I../include -I../include/perl -I../include/perl/docs 
-DPERL_CPAN_NAMESPACE -I -perl -o gdalconst_wrap.c gdalconst.i
swig -Wall -I../include -I../include/perl -I../include/perl/docs 
-DPERL_CPAN_NAMESPACE -I -c++ -perl -o ogr_wrap.cpp ogr.i
swig -Wall -I../include -I../include/perl -I../include/perl/docs 
-DPERL_CPAN_NAMESPACE -I -c++ -perl -o osr_wrap.cpp osr.i

i.e., cpl.i is ok for Perl

line 214 at cpl.i is #ifndef SWIGRUBY

the corresponding #endif seems to be on the last line and without 
newline, maybe that's confusing your swig? Add a newline to the end of 
the file and say make.

my swig is 1.3.36

>
> Regards,
> Stefan
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev


-- 
Prof. Ari Jolma
Environmental Management Information Technology
Teknillinen Korkeakoulu / Helsinki University of Technology
tel: +358 9 4511 address: POBox 5300, 02015 TKK, Finland
Email: ari.jolma at tkk.fi URL: http://geoinformatics.tkk.fi



More information about the gdal-dev mailing list