[Gdal-dev] problems with "GDAL + Java SWIG" set up on Windows XP

Daniele Romagnoli dany.geotools at gmail.com
Wed Jun 21 13:04:52 EDT 2006


Hi guys,

I'm trying to set up under Windows XP all the items needed to use GDAL with
JAVA.
Norman Barker has already given a great help to me but I have some problems.

Using the procedure found at
http://article.gmane.org/gmane.comp.gis.gdal.devel/6109/match=gdal+visual+c+++expressplus
some other tips, an error occurs:

---------------------------------------------------------------------------------------------------------------------

...................

C:\gdal\frmts>cd gtiff   && nmake /NOLOGO /f makefile.vc   && cd ..
        cl /nologo /MD /EHsc /Zi /Fd..\..\gdal.pdb -I..\..\port -I..\..\ogr
-I..
\..\gcore  -I..\..\alg -Ilibtiff -Ilibgeotiff /c tifvsi.cpp
tifvsi.cpp
C:\Programmi\Microsoft Visual Studio 8\VC\INCLUDE\swprintf.inl(41) : error
C2664
: '_vswprintf_c_l' : cannot convert parameter 4 from 'void *' to '_locale_t'
        Conversion from 'void*' to pointer to non-'void' requires an
explicit ca
st
C:\Programmi\Microsoft Visual Studio 8\VC\INCLUDE\swprintf.inl(51) : error
C2664
: '_vswprintf_c_l' : cannot convert parameter 4 from 'void *' to '_locale_t'
        Conversion from 'void*' to pointer to non-'void' requires an
explicit ca
st
NMAKE : fatal error U1077: '"C:\Programmi\Microsoft Visual Studio
8\VC\BIN\cl.EX
E"' : return code '0x2'
Stop.

---------------------------------------------------------------------------------------------------------------------

So, I have tried the "cygwin" way to build GDAL and it seems working:

./configure
make
make install

However, when I follow the steps suggested by Ben Collins at
http://lists.maptools.org/pipermail/gdal-dev/2006-February/007867.html, this
error occurs:
---------------------------------------------------------------------------------------------------------------------

........
/bin/sh.exe /cygdrive/c/gdal2/libtool --mode=compile g++ -fPIC -Wall  -O2
-I/cygdrive/c/gdal2/port -I/cygdrive/c/gdal2/gcore -I/cygdrive/c/gdal2/alg
-I/cygdrive/c/gdal2/ogr -I/cygdrive/c/gdal2/ogr/ogrsf_frmts
-I/usr/java/j2sdk1.4.2_08/include -I/usr/java/j2sdk1.4.2_08/include/win32 -c
osr_wrap.cpp
 g++ -fPIC -Wall -O2 -I/cygdrive/c/gdal2/port -I/cygdrive/c/gdal2/gcore
-I/cygdrive/c/gdal2/alg -I/cygdrive/c/gdal2/ogr
-I/cygdrive/c/gdal2/ogr/ogrsf_frmts -I/usr/java/j2sdk1.4.2_08/include
-I/usr/java/j2sdk1.4.2_08/include/win32 -c osr_wrap.cpp  -DPIC -o
.libs/osr_wrap.o
osr_wrap.cpp:1: warning: -fPIC ignored for target (all code is position
independent)
osr_wrap.cpp: In function `__jobjectArray*
Java_org_gdal_osr_osrJNI_GetProjectionMethods(JNIEnv*, __jclass*)':
osr_wrap.cpp:2233: error: invalid conversion from `__jarray*' to
`__jobjectArray*'
osr_wrap.cpp: In function `__jobjectArray*
Java_org_gdal_osr_osrJNI_GetProjectionMethodParameterList(JNIEnv*,
__jclass*, __jstring*, __jobjectArray*)':
osr_wrap.cpp:2285: error: invalid conversion from `__jarray*' to
`__jobjectArray*'
make: *** [osr_wrap.o] Error 1
---------------------------------------------------------------------------------------------------------------------


Maybe I blundered during some step.
Anyone can help me?

Regards,
Daniele
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20060621/7a231a5b/attachment.html


More information about the Gdal-dev mailing list