Hi list,<br>I'm bothering you again with some issues I'm encountering in Building/using GDAL with Jasper support.<br>Which the right procedure to build GDAL with Jasper support on Windows is?<br><br>There are my steps:<br>
I have downloaded the modified version of Jasper from here: <a href="ftp://ftp.remotesensing.org/gdal/jasper-1.900.1.uuid.tar.gz">ftp://ftp.remotesensing.org/gdal/jasper-1.900.1.uuid.tar.gz</a><br>Then, I have opened the dsw Visual Studio file and "automatically converted" the dsp files to VS.net 2003 projects. <br>
I have changed the solution configuration from "debug" to "release" and I have built it (I get error from the only JIV project due to missing OpenGL header files, but since JIV is a viewer I guess this error is not matter... right?).<br>
Then I have properly modified the NMAKE.OPT file with the jasper required changes.<br>When building GDAL I get several link errors:<br>....<br>LIBC.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRT.lib(MSVCR71.dll)<br>
LIBC.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRT.lib(cinitexe.obj)<br>LIBC.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRT.lib(cinitexe.obj)<br>LIBC.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRT.lib(cinitexe.obj)<br>
LIBC.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRT.lib(cinitexe.obj)<br>LIBC.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter already defined in MSVCRT.lib(MSVCR71.dll)<br>LIBC.lib(mbctype.obj) : error LNK2005: __getmbcp already defined in MSVCRT.lib(MSVCR71.dll)<br>
MSVCRT.lib(MSVCR71.dll) : error LNK2005: __unlink already defined in LIBC.lib(unlink.obj)<br>...<br><br>Then I changed the jasper build modifying the visual studio settings from /ML to /MD (C++->CodeGeneration->RunTime Library) and no more errors happen. <br>
Finally I have generated java bindings with SWIG. However, using bindings, the JVM crashes with an EXCEPTION_STACK_OVERFLOW when I attempts to get the colorInterpretation of a band or when I read data.<br>In attachment: the log of the JVM Crash.<br>
However, calling gdalinfo (from that build) on the test file correctly displays the ColorInterpretation. (I have set GDAL_SKIP to bypass JP2KAK, JP2ECW, JP2MrSID to catch the Jasper driver)<br>Even using gdal_translate works fine. <br>
<br>Can someone provide me useful tips/corrections on wrong settings?<br>Did someone already successfully used the GDAL jasper driver via Java bindings?<br>Thank you very much.<br><br>Best Regards,<br>Daniele R.<br><br><br>
-- <br>-------------------------------------------------------<br>Eng. Daniele Romagnoli <br>Software Engineer<br><br>GeoSolutions S.A.S.<br>Via Carignoni 51<br>55041 Camaiore (LU)<br>Italy<br><br>phone: +39 0584983027<br>
fax: +39 0584983027<br>mob: +39 328 0559267<br><br><br><a href="http://www.geo-solutions.it">http://www.geo-solutions.it</a><br><br>-------------------------------------------------------<br>