[gdal-dev] JPEG2000 decoding using OpenJpeg linking errors

Martin Chapman chapmanm at pixia.com
Fri Apr 6 14:01:05 EDT 2012


Robert,

 

If it makes you feel any better I tried to do the same thing recently only
using VS2010 (GDAL 1.9) and had the same issue.  I think the main issue is
that the v2 branch is still in development and has morphed from the time
when the gdal driver was implemented.  That was my best guess at the time
and I gave up on it eventually and resorted to using the LizardTech DSDK
for jp2 instead.  You can only do that for dev purposes though without a
DSDK license.  I wish the OpenJpeg driver worked though because it appears
to be the only real viable option for JP2 because of its license.

 

If you happen to solve the problem please post the solution for the rest
of us.

 

Best regards,

Martin

 

From: gdal-dev-bounces at lists.osgeo.org
[mailto:gdal-dev-bounces at lists.osgeo.org] On Behalf Of Robert Zermeno
Sent: Thursday, April 05, 2012 9:44 PM
To: gdal-dev at lists.osgeo.org
Subject: [gdal-dev] JPEG2000 decoding using OpenJpeg linking errors

 


Ladies and Gents,

I have downloaded the v2 branch of openjpeg from the svn yesterday while
using CMAKE to construct VS2005 static library projects.  All went well to
build the static library.  I linked the static library via modifying
nmake.opt to point to the path location of the library (.lib) file and the
include file (openjpeg.h).

I issue the command via VS2005 command prompt:

nmake /f makefile.vc debug=1

GDAL can compile successfully, but when it tries to create gdal_i.lib, I
get LNK2019 errors for all references to openjpeg library (file
openjpegdataset.obj).  The first two LNK2019 are in  IReadBlock  of 
opj_end_decompress at 8
opj_decode_tile_header at 40

What steps do I have to take to make it work?  Have I forgotten a step?
This is what I have in nmake.opt:

OPENJPEG_ENABLED = YES
OPENJPEG_CFLAGS = -IC:\openjpeg\libopenjpeg
OPENJPEG_LIB = C:\openjpeg\bin\Release\openjpeg.lib

 

CFLAGS should point to openjpeg.h and LIB should point to the openjpeg.lib
file.  It should work but I am puzzled?  Any advice?  Do I need to provide
more information?  Has anyone experienced this problem?

 

FYI, I have performed a dumpbin.exe /SYMBOLS to verify the contents of the
.lib file does have the requested functions to be used statically.

 

Robert

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120406/a947e9b1/attachment.html


More information about the gdal-dev mailing list