<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Courier;
        panose-1:2 7 4 9 2 2 5 2 4 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Robert,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>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.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>If you happen to solve the problem please post the solution for the rest of us.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Best regards,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Martin<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> gdal-dev-bounces@lists.osgeo.org [mailto:gdal-dev-bounces@lists.osgeo.org] <b>On Behalf Of </b>Robert Zermeno<br><b>Sent:</b> Thursday, April 05, 2012 9:44 PM<br><b>To:</b> gdal-dev@lists.osgeo.org<br><b>Subject:</b> [gdal-dev] JPEG2000 decoding using OpenJpeg linking errors<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:0in 0in 0in 0in'><p class=MsoNormal style='margin-bottom:12.0pt'>Ladies and Gents,<br><br>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).<br><br>I issue the command via VS2005 command prompt:<br><br>nmake /f makefile.vc debug=1<br><br>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 <br>opj_end_decompress@8<br>opj_decode_tile_header@40<br><br>What steps do I have to take to make it work? Have I forgotten a step? This is what I have in nmake.opt:<o:p></o:p></p><p><span style='font-size:10.0pt;font-family:Courier'>OPENJPEG_ENABLED = YES<br>OPENJPEG_CFLAGS = -IC:\openjpeg\libopenjpeg<br>OPENJPEG_LIB = C:\openjpeg\bin\Release\openjpeg.lib<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Courier'><o:p> </o:p></span></p><p><span style='font-size:10.0pt;font-family:Courier'>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?<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Courier'><o:p> </o:p></span></p><p><span style='font-size:10.0pt;font-family:Courier'>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.<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Courier'><o:p> </o:p></span></p><p><span style='font-size:10.0pt;font-family:Courier'>Robert<o:p></o:p></span></p></td></tr></table><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p></div></body></html>