[gdal-dev] Fail to build with OpenJpeg
Joaquim Luis
jluis at ualg.pt
Wed Mar 9 12:11:28 EST 2011
On 09-03-2011 16:28, Tamas Szekeres wrote:
> I had to do the following tweaks in order to compile openjpegv2 from SVN.
>
> Index: CMakeLists.txt
> ===================================================================
> --- CMakeLists.txt (revision 660)
> +++ CMakeLists.txt (working copy)
> @@ -50,6 +50,7 @@
> IF(WIN32)
> IF(BUILD_SHARED_LIBS)
> ADD_DEFINITIONS(-DOPJ_EXPORTS)
> + ADD_DEFINITIONS(-DUSE_OPJ_DEPRECATED)
> ELSE(BUILD_SHARED_LIBS)
> ADD_DEFINITIONS(-DOPJ_STATIC)
> ENDIF(BUILD_SHARED_LIBS)
> Index: openjpeg.h
> ===================================================================
> --- openjpeg.h (revision 660)
> +++ openjpeg.h (working copy)
> @@ -37,7 +37,7 @@
> #define OPJ_API
> #define OPJ_CALLCONV
> #else
> - #define OPJ_CALLCONV __stdcall
> + #define OPJ_CALLCONV //__stdcall
> #ifdef OPJ_EXPORTS
> #define OPJ_API __declspec(dllexport)
> #else
>
>
> BTW: The compiled binaries/libs/headers (including x64) are available
> to download from: http://vbkto.dyndns.org/sdk/
Thank you very much Tamas.
I guess that to build the X64 you had to point it to a X64 libtiff.lib
that you have build yourself as well?
And, sorry, which one of your files has the libs and includes?
Not this one: release-1600-x64-gdal-mapserver.zip
<http://vbkto.dyndns.org/sdk/Download.aspx?file=release-1600-x64-gdal-mapserver.zip>
perhaps this? gdal-19dev-1600-x64-core.msi
<http://vbkto.dyndns.org/sdk/Download.aspx?file=release-1600-x64-gdal-mapserver%5Cgdal-19dev-1600-x64-core.msi>
I confess that I don't like the .msi installers because i never know
what else the they do besides installing the package.
Joaquim
>
> Best regards,
>
> Tamas
>
>
>
> 2011/3/9 Joaquim Luis <jluis at ualg.pt <mailto:jluis at ualg.pt>>
>
> On 09-03-2011 02:59, Angelos Tzotsos wrote:
>> Hi Joaquim,
>>
>> In order to build with OpenJpeg, you must use the unreleased
>> version 2.0 of OpenJpeg.
>> Try the following:
>> http://code.google.com/p/openjpeg/downloads/detail?name=openjpeg_v2_alpha_0.zip
>>
>
> Thanks Angelos, but with this version I'm not even able to build
> OpenJpeg as it hangs on CMake with this error
> Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR)
>
> Easy to fix the above by pointing into its local libtiff directory
> but compilation hangs latter on with (only first of many)
>
> Error 1 error C2373: 'opj_stream_create' : redefinition;
> different type modifiers
> C:\programs\compa_libs\OpenJPEG_V2_Alpha\Development\libopenjpeg\cio.c
> 228 1 openjpeg
>
> Also, since it comes with a libtif.lib it would not likely compile
> for Win64 which is may main goal to try this.
>
> Regards
>
> Joaquim
>
>
>>
>> Regards,
>> Angelos
>>
>> On 03/09/2011 03:23 AM, Joaquim Luis wrote:
>>> Hi,
>>>
>>> My attempt to build gdal (trunk) on Windows with OpenJpeg failed
>>> with these errors
>>>
>>> C:\programs\GDALtrunk\gdal\frmts>cd openjpeg && nmake /nologo /f
>>> makefile.vc <http://makefile.vc> && cd .. || exit 1
>>> cl /nologo /MD /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE
>>> /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG /W4 /wd4127 /wd4251 /wd4275
>>> /wd4786 /wd4100 /wd4245 /wd4206 /wd4018 /wd4389 -I..\..\port
>>> -I..\..\ogr -I..\..\gcore -I..\..\alg -I..\..\ogr\ogrsf_frmts
>>> -IC:\programs\compa_libs\openjpeg_v1_4\libopenjpeg
>>> -DOGR_ENABLED /c openjpegdataset.cpp
>>> openjpegdataset.cpp
>>> openjpegdataset.cpp(80) : error C2146: syntax error : missing
>>> ';' before identifier 'JP2OpenJPEGDataset_Read'
>>> openjpegdataset.cpp(80) : error C4430: missing type specifier -
>>> int assumed. Note: C++ does not support default-int
>>> openjpegdataset.cpp(80) : error C2061: syntax error : identifier
>>> 'OPJ_UINT32'
>>>
>>> I greped for OPJ_UINT32 in the OpenJpeg source and on GDAL's)
>>> and there was no sign of it.
>>> I am using openjpeg_v1_4_source_r697 as per its web site.
>>>
>>>
>>> Joaquim
>>> _______________________________________________
>>> gdal-dev mailing list
>>> gdal-dev at lists.osgeo.org <mailto:gdal-dev at lists.osgeo.org>
>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>>
>>
>>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org <mailto:gdal-dev at lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110309/aa560a08/attachment.html
More information about the gdal-dev
mailing list