[Gdal-dev] Re: problems with "GDAL + Java SWIG" set up on Windows
XP
Collins, Benjamin
collinsb at mitre.org
Wed Jun 21 14:22:52 EDT 2006
So, obviously the Java SWIG build process could use some "refining".
The current setup should allow VC building on Win32. I have not been
testing on cygwin for other reasons.
Since you have gotten this far, I would imagine that the *.so.exe files
could be renamed *.dll to be functional. This is a guess, and obviosly
should not be a part of the normal build process! The *.so extension
is hard-coded into the GNUmakefile (bad!) and cygwin and libtool must
be dredging up that .exe extension from somewhere. These are issues
for which someone who is build-file knowledgeable would be very
valuable.
--
Ben
>-----Original Message-----
>From: gdal-dev-bounces at lists.maptools.org
>[mailto:gdal-dev-bounces at lists.maptools.org] On Behalf Of
>Daniele Romagnoli
>Sent: Wednesday, June 21, 2006 1:22 PM
>To: gdal-dev at lists.maptools.org
>Cc: Simone Giannecchini
>Subject: [Gdal-dev] Re: problems with "GDAL + Java SWIG" set
>up on Windows XP
>
>Ok... I have solved the last error but a new 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/j2sdk1.4.2_08/include
>-I/usr/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/j2sdk1.4.2_08/include
>-I/usr/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)
> 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/j2sdk1.4.2_08/include
>-I/usr/j2sdk1.4.2_08/include/win32 -c osr_wrap.cpp -o
>osr_wrap.o >/dev/null 2>&1
>/bin/sh.exe /cygdrive/c/gdal2/libtool --mode=link g++
>-shared /cygdrive/c/gdal2/libgdal.la osr_wrap.o -o libosrjni.so
>g++ -shared osr_wrap.o -o libosrjni.so.exe
>/cygdrive/c/gdal2/.libs/libgdal.a /usr/lib/libjasper.dll.a
>-L/usr/X11R6/lib /usr/lib/libtiff.dll.a /usr/lib/libjpeg.dll.a
>-lpng -lz
>cp ./.libs/*.so ./
>cp: cannot stat `./.libs/*.so': No such file or directory
>make: *** [build] Error 1
>
>However, I see that in the directory there are 4 files *.so.exe
>
>Maybe can I rename them from *.so.exe to *.so and then move
>them to the /.libs folder?
>....
>
>Regards
>
>
>
>
>On 6/21/06, Daniele Romagnoli <dany.geotools at gmail.com> wrote:
>
> 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=g
>dal+visual+c+++express
><http://article.gmane.org/gmane.comp.gis.gdal.devel/6109/match=
>gdal+visual+c+++express> plus 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/0078
>67.html
><http://lists.maptools.org/pipermail/gdal-dev/2006-February/007
>867.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(JNIEn
>v*, __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
>
>
>
>
>
>
More information about the Gdal-dev
mailing list