Hi guys,<br><br>I'm trying to set up under Windows XP all the items needed to use GDAL with JAVA.<br>Norman Barker has already given a great help to me but I have some problems.<br><br>Using the procedure found at <a href="http://article.gmane.org/gmane.comp.gis.gdal.devel/6109/match=gdal+visual+c+++express" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://article.gmane.org/gmane.comp.gis.gdal.devel/6109/match=gdal+visual+c+++express</a> plus some other tips, an error occurs:<br><div><p><font face="Times New Roman" size="2"><span style="font-size: 10pt;">
---------------------------------------------------------------------------------------------------------------------</span></font></p></div>
<div>
<p><font face="Times New Roman" size="2"><span style="font-size: 12pt;">................... </span><span style="font-size: 10pt;"><br></span></font></p><p><font face="Times New Roman" size="2">
<span style="font-size: 10pt;">C:\gdal\frmts>cd gtiff && nmake /NOLOGO /f
<a href="http://makefile.vc" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">makefile.vc</a> && cd ..<br> cl /nologo /MD /EHsc /Zi
/Fd..\..\gdal.pdb -I..\..\port -I..\..\ogr -I..<br>\..\gcore -I..\..\alg
-Ilibtiff -Ilibgeotiff /c tifvsi.cpp<br>tifvsi.cpp<br>C:\Programmi\Microsoft
Visual Studio 8\VC\INCLUDE\swprintf.inl(41) : error C2664<br>: '_vswprintf_c_l'
: cannot convert parameter 4 from 'void *' to '_locale_t'<br> Conversion
from 'void*' to pointer to non-'void' requires an explicit
ca<br>st<br>C:\Programmi\Microsoft Visual Studio 8\VC\INCLUDE\swprintf.inl(51) :
error C2664<br>: '_vswprintf_c_l' : cannot convert parameter 4 from 'void *' to
'_locale_t'<br> Conversion from 'void*' to pointer to non-'void' requires
an explicit ca<br>st<br>NMAKE : fatal error U1077: '"C:\Programmi\Microsoft
Visual Studio 8\VC\BIN\cl.EX<br>E"' : return code
'0x2'<br>Stop.</span></font></p></div>
<div>
</div>
<div>
<p><font face="Times New Roman" size="2"><span style="font-size: 10pt;">---------------------------------------------------------------------------------------------------------------------</span></font>
</p></div><br>So, I have tried the "cygwin" way to build GDAL and it seems working:<br><br>./configure<br>make<br>make install<br><br>However, when I follow the steps suggested by Ben Collins at <a href="http://lists.maptools.org/pipermail/gdal-dev/2006-February/007867.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://lists.maptools.org/pipermail/gdal-dev/2006-February/007867.html</a>, this error occurs:<br><font face="Times New Roman" size="2"><span style="font-size: 10pt;">---------------------------------------------------------------------------------------------------------------------
</span></font><br>........<br>/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
<br> 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
<br>osr_wrap.cpp:1: warning: -fPIC ignored for target (all code is position independent)<br>osr_wrap.cpp: In function `__jobjectArray* Java_org_gdal_osr_osrJNI_GetProjectionMethods(JNIEnv*, __jclass*)':<br>osr_wrap.cpp:2233: error: invalid conversion from `__jarray*' to `__jobjectArray*'
<br>osr_wrap.cpp: In function `__jobjectArray* Java_org_gdal_osr_osrJNI_GetProjectionMethodParameterList(JNIEnv*, __jclass*, __jstring*, __jobjectArray*)':<br>osr_wrap.cpp:2285: error: invalid conversion from `__jarray*' to `__jobjectArray*'
<br>make: *** [osr_wrap.o] Error 1<br><font face="Times New Roman" size="2"><span style="font-size: 10pt;">---------------------------------------------------------------------------------------------------------------------
</span></font><br><br>Maybe I blundered during some step.<br>Anyone can help me?<br><br>Regards,<br>Daniele<br><br><br>