[Gdal-dev] swig java: c/c++
Collins, Benjamin
collinsb at mitre.org
Tue May 16 10:35:51 EDT 2006
Sorry for the partial message (you would think that shift-enter was
hard to hit accidentially)
Run the following to tell make that the source files are up to date and
do not need rebuilding:
touch *.cpp
touch *.c
Then run 'make build' and the lib<*>jni.so files should be built.
Please let me know if there are any issues.
Also, to build the wrapper file themselves, please use SWIG version
1.3.27+
--
Ben
>-----Original Message-----
>From: Collins, Benjamin
>Sent: Tuesday, May 16, 2006 10:28 AM
>To: 'Christine Spietz'; gdal-dev at lists.maptools.org
>Subject: RE: [Gdal-dev] swig java: c/c++
>
>Unless you WANT to do the swig build, it should not be
>necessary, since checed into CVS are the generated c/c++ files
>from the original author, which should be generally useful.
>They work under GNU/Linux from a week-old snapshot.
>
>In order to have 'make build' in swig/java not try to run swig
>run the following commands which in the java directory.
>
>
>>-----Original Message-----
>>From: gdal-dev-bounces at lists.maptools.org
>>[mailto:gdal-dev-bounces at lists.maptools.org] On Behalf Of
>>Christine Spietz
>>Sent: Tuesday, May 16, 2006 3:46 AM
>>To: gdal-dev at lists.maptools.org
>>Subject: Re: [Gdal-dev] swig java: c/c++
>>
>> Hi Frank,
>>
>> lot of thanks for your help!
>> After running "./config" in GDAL_HOME I got the GDALmake.opt.
>> Then I installed swig1.3.24 and tried to run "make build" in the
>> swig/java-directory.
>>
>> The compiling process for the c/c++-sources starts, but there
>>seem to be
>> some errors in the c++-code (?)
>>
>> error:
>> ....
>> gdal_wrap.cpp:1774:error:GDALDriverShadow_get_ShortName was
>>not declared in
>> this scope
>> ....
>> gdal_wrap.cpp:1808:error:GDALDriverShadow_get_HelpTopic was
>>not declared in
>> this scope
>> ....
>> gdal_wrap.cpp:2721:error:GDALDatasetShadow_get_RasterXSize
>>was not declared
>> in this scope
>> ....
>> gdal_wrap.cpp:2736:error:GDALDatasetShadow_get_RasterYSize
>>was not declared
>> in this scope
>> ....
>> gdal_wrap.cpp:2751:error:GDALDatasetShadow_get_RasterCount
>>was not declared
>> in this scope
>> ....
>> gdal_wrap.cpp:3209:error:GDALRasterBandShadow_get_XSize was
>>not declared in
>> this scope
>> ....
>> gdal_wrap.cpp:3224:error:GDALRasterBandShadow_get_YSize was
>>not declared in
>> this scope
>> ....
>> gdal_wrap.cpp:3239:error:GDALRasterBandShadow_get_DataType
>>was not declared
>> in this scope
>> ...
>> make: *** [gdal_wrap.o] Error 1
>>
>> Does anybody know, what to do to get the ./libs/lib*jni.so
>>files which I
>> need to get the java bindings running?
>>
>>
>> Beste regards
>>
>> Christine
>>
>>
>>> ----- Original Message -----
>>> From: "Frank Warmerdam" <warmerdam at pobox.com>
>>> To: "Christine Spietz" <spietz at fh-bingen.de>
>>> Cc: <gdal-dev at lists.maptools.org>
>>> Sent: Thursday, May 11, 2006 8:28 PM
>>> Subject: Re: [Gdal-dev] swig java: c/c++
>>>
>>>
>>>> Christine Spietz wrote:
>>>>> The problem:
>>>>> If I go into the swig/java directoty and call 'make build'
>>there is the
>>>>> first error:
>>>>> ###
>>>>> [ GNUmakefile:3 ../../GDALmake.opt: No such file or directory ]
>>>>> ###
>>>>> => So I changed in swig/java/GNUmakefile the first include from
>>>>> 'GDALmake.opt' to 'GDALmake.opt.in'. This will solve this
problem.
>>>>
>>>> Christine,
>>>>
>>>> A more appropriate solution is to run configure to make the
>>GDALmake.opt
>>>> file from GDALmake.opt.in.
>>>>
>>>>
>>>>> Then again I call 'make build' and the next error occurs:
>>>>> ###
>>>>> swig -Wall -I../inculde -I ../include/java -outdir
>>>>> "org/gdal/gdal" -package
>>>>> "org.gdal.gdal" -[@abs_top_builddir -c++ -java -o
>>gdal_wrap.cpp gdal.i
>>>>> ... /bin/sh: swig: command not found
>>>>> make: *** [gdal_wrap.cpp] Error 127
>>>>> ###
>>>>
>>>> You will need to have SWIG installed to generate the
>>bindings. I believe
>>>> a very recent version is required though I'm not sure exactly what
>>>> version
>>>> that is.
>>>>
>>>> http://www.swig.org/
>>>>
>>>> I'm afraid building the java bindings is likely to be complicated.
>>>>
>>>> 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 OSGF,
>>http://osgeo.org
>>>>
>>>
>>
>>_______________________________________________
>>Gdal-dev mailing list
>>Gdal-dev at lists.maptools.org
>>http://lists.maptools.org/mailman/listinfo/gdal-dev
>>
More information about the Gdal-dev
mailing list