<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 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-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;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</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-GB link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal>All,<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>I have been trying to build GDAL with ECWJP2 support with
the ERDAS 4.2 SDK, without much sucess.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>I am finding runtime crashes in both Release and Debug build
when running in the visual studio debugger:<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>This in Debug:<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal> NCSUtil4d.dll!NCS::CMutexLock::CMutexLock(NCS::CMutex
* pmMutex=0x0043e6e0) Line 156 + 0x12 bytes C++<o:p></o:p></p>
<p class=MsoNormal> NCSEcw4d.dll!NCS::CView::SetFileInfo(NCSFileViewFileInfoEx
& Info={...}) Line 1316 + 0x12 bytes C++<o:p></o:p></p>
<p class=MsoNormal>> gdal_ECW_JP2ECW.dll!GDALECWCompressor::Initialize(const
char * pszFilename=0x0043dda0, char * * papszOptions=0x00000000, int
nXSize=100, int nYSize=150, int nBands=1, int bRGBA=0, GDALDataType
eType=GDT_Byte, const char * pszWKT=0x00000000, double *
padfGeoTransform=0x0043e320, int nGCPCount=0, const GDAL_GCP *
pasGCPList=0x00000000, int bIsJPEG2000=1) Line 910 + 0x29 bytes C++<o:p></o:p></p>
<p class=MsoNormal> gdal_ECW_JP2ECW.dll!ECWWriteDataset::Crystalize()
Line 1433 + 0x65 bytes C++<o:p></o:p></p>
<p class=MsoNormal> gdal_ECW_JP2ECW.dll!ECWWriteDataset::FlushLine()
Line 1459 + 0x8 bytes C++<o:p></o:p></p>
<p class=MsoNormal> gdal_ECW_JP2ECW.dll!ECWWriteRasterBand::IWriteBlock(int
nBlockX=0, int nBlockY=0, void * pBuffer=0x0043dcd8) Line 1561 + 0xb
bytes C++<o:p></o:p></p>
<p class=MsoNormal> gdal18.dll!GDALRasterBlock::Write()
Line 518 C++<o:p></o:p></p>
<p class=MsoNormal> gdal18.dll!GDALRasterBand::FlushBlock(int
nXBlockOff=0, int nYBlockOff=0, int bWriteDirtyBlock=1) Line 1079 + 0x8
bytes C++<o:p></o:p></p>
<p class=MsoNormal> gdal18.dll!GDALDataset::BlockBasedFlushCache()
Line 424 + 0x12 bytes C++<o:p></o:p></p>
<p class=MsoNormal> gdal_ECW_JP2ECW.dll!ECWWriteDataset::FlushCache()
Line 1366 C++<o:p></o:p></p>
<p class=MsoNormal> gdal_ECW_JP2ECW.dll!ECWWriteDataset::~ECWWriteDataset()
Line 1345 C++<o:p></o:p></p>
<p class=MsoNormal> gdal_ECW_JP2ECW.dll!ECWWriteDataset::`vector
deleting destructor'() + 0x50 bytes C++<o:p></o:p></p>
<p class=MsoNormal> gdal18.dll!GDALClose(void
* hDS=0x0043e270) Line 2380 + 0x20 bytes C++<o:p></o:p></p>
<p class=MsoNormal> jpg2000test.exe!main()
Line 60 C++<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>I have double checked the build lines:<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal> cd frmts<o:p></o:p></p>
<p class=MsoNormal> nmake /nologo /f
makefile.vc plugindirs<o:p></o:p></p>
<p class=MsoNormal> for %d in (
ecw ) do cd %d && nmake /nologo /f makefile.vc plugin
&& cd .. || exit 1<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>D:\ThirdPartyBuilds\GDAL\GDAL-1.80-EDRAS-PLUGIN\gdal-1.8.0\frmts>cd
ecw && nmake /nologo /f makefile.vc plugin
&& cd .. || exit 1<o:p></o:p></p>
<p class=MsoNormal> cl /nologo
/MD /EHsc /Zi /W4 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
/Fd..\..\gdal18.pdb /DDEBUG -I..\..\port -I..\..\ogr -I..\..\gcore
-I..\..\alg -I..\..<o:p></o:p></p>
<p class=MsoNormal>\ogr\ogrsf_frmts -DHAVE_COMPRESS -DECWSDK_VERSION=41
-I"D:\Program Files (x86)\ERDAS\ERDAS ECWJP2 SDK Desktop
Read-Write"\include -I"D:\Program Files (x86)\ERDAS\ERDAS
ECWJP2 SDK<o:p></o:p></p>
<p class=MsoNormal> Desktop Read-Write"\include/ecw/api
-I"D:\Program Files (x86)\ERDAS\ERDAS ECWJP2 SDK Desktop
Read-Write"\include/ecw/jp2 -I"D:\Program Files
(x86)\ERDAS\ERDAS ECWJP2 SDK Desktop<o:p></o:p></p>
<p class=MsoNormal>Read-Write"\include/ecw/ecw -DFRMT_ecw
-DOGR_ENABLED /c ecwdataset.cpp<o:p></o:p></p>
<p class=MsoNormal>ecwdataset.cpp<o:p></o:p></p>
<p class=MsoNormal> cl /nologo
/MD /EHsc /Zi /W4 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
/Fd..\..\gdal18.pdb /DDEBUG -I..\..\port -I..\..\ogr -I..\..\gcore
-I..\..\alg -I..\..<o:p></o:p></p>
<p class=MsoNormal>\ogr\ogrsf_frmts -DHAVE_COMPRESS -DECWSDK_VERSION=41
-I"D:\Program Files (x86)\ERDAS\ERDAS ECWJP2 SDK Desktop
Read-Write"\include -I"D:\Program Files (x86)\ERDAS\ERDAS
ECWJP2 SDK<o:p></o:p></p>
<p class=MsoNormal> Desktop Read-Write"\include/ecw/api
-I"D:\Program Files (x86)\ERDAS\ERDAS ECWJP2 SDK Desktop
Read-Write"\include/ecw/jp2 -I"D:\Program Files
(x86)\ERDAS\ERDAS ECWJP2 SDK Desktop<o:p></o:p></p>
<p class=MsoNormal>Read-Write"\include/ecw/ecw -DFRMT_ecw
-DOGR_ENABLED /c ecwcreatecopy.cpp<o:p></o:p></p>
<p class=MsoNormal>ecwcreatecopy.cpp<o:p></o:p></p>
<p class=MsoNormal> cl /nologo
/MD /EHsc /Zi /W4 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
/Fd..\..\gdal18.pdb /DDEBUG -I..\..\port -I..\..\ogr -I..\..\gcore -I..\..\alg
-I..\..<o:p></o:p></p>
<p class=MsoNormal>\ogr\ogrsf_frmts -DHAVE_COMPRESS -DECWSDK_VERSION=41
-I"D:\Program Files (x86)\ERDAS\ERDAS ECWJP2 SDK Desktop
Read-Write"\include -I"D:\Program Files (x86)\ERDAS\ERDAS
ECWJP2 SDK<o:p></o:p></p>
<p class=MsoNormal> Desktop Read-Write"\include/ecw/api
-I"D:\Program Files (x86)\ERDAS\ERDAS ECWJP2 SDK Desktop
Read-Write"\include/ecw/jp2 -I"D:\Program Files
(x86)\ERDAS\ERDAS ECWJP2 SDK Desktop<o:p></o:p></p>
<p class=MsoNormal>Read-Write"\include/ecw/ecw -DFRMT_ecw
-DOGR_ENABLED /c jp2userbox.cpp<o:p></o:p></p>
<p class=MsoNormal>jp2userbox.cpp<o:p></o:p></p>
<p class=MsoNormal> link /dll /debug
/out:gdal_ECW_JP2ECW.dll ecwdataset.obj ecwcreatecopy.obj jp2userbox.obj
..\../gdal_i.lib "D:\Program Files (x86)\ERDAS\ERDAS ECWJP2 SDK Desktop
Read-Write<o:p></o:p></p>
<p class=MsoNormal>"\lib\vc80\win32\NCSEcw4d.lib "D:\Program
Files (x86)\ERDAS\ERDAS ECWJP2 SDK Desktop
Read-Write"\lib\vc80\win32\NCSUtil4d.lib "D:\Program Files
(x86)\ERDAS\ERDAS ECWJP2 SDK Deskt<o:p></o:p></p>
<p class=MsoNormal>op Read-Write"\lib\vc80\win32\NCScnet4d.lib<o:p></o:p></p>
<p class=MsoNormal>Microsoft (R) Incremental Linker Version 8.00.50727.762<o:p></o:p></p>
<p class=MsoNormal>Copyright (C) Microsoft Corporation. All rights
reserved.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>LINK : gdal_ECW_JP2ECW.dll not found or not built by the
last incremental link; performing full link<o:p></o:p></p>
<p class=MsoNormal> Creating library gdal_ECW_JP2ECW.lib and object
gdal_ECW_JP2ECW.exp<o:p></o:p></p>
<p class=MsoNormal> if exist
gdal_ECW_JP2ECW.dll.manifest mt -manifest gdal_ECW_JP2ECW.dll.manifest
-outputresource:gdal_ECW_JP2ECW.dll;2<o:p></o:p></p>
<p class=MsoNormal>Microsoft (R) Manifest Tool version 5.2.3790.2075<o:p></o:p></p>
<p class=MsoNormal>Copyright (c) Microsoft Corporation 2005.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>-- Any advice pointing me in the right direction would be
very gratefully received.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Regards, Emmet.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>