<div dir="ltr"><div><div><div><div><div><div><div><div><div>Hi list,<br><br>As mentioned before I'm having trouble getting the new ECW SDK working in MapWinGIS which is using GDAL.<br></div>I'm now trying to statically link ECW v5 with GDAL.<br>
</div>I've found this documentation:<br><span style="font-family:courier new,monospace">When linking against the static libraries on Windows, you must define<br>NCSECW_EXPORTS as a pre-processor definition. Both the dynamic and<br>
static libraries on Windows are linked against the dynamic msvc run-time library (/MD and /MDd).<br>When linking on Windows platforms, for dynamic libraries link against<br>NCSEcw.lib and NCSEcwd.lib for release and debug modes respectively. For static libraries, link against NCSEcwS.lib and NCSEcwSd.lib for release and debug modes respectively.</span><br>
</div><br>I'm compiling GDAL using nmake in a Visual Studio 2008 command prompt.<br><br>And I've changed my nmake.local to <br><span style="font-family:courier new,monospace">ECWDIR = $(GDAL_HOME)\..\ERDAS-ECW-JPEG-2000-SDK-5.0<br>
ECWFLAGS = -DECWSDK_VERSION=50 <b>-DNCSECW_EXPORTS</b> \<br> -I$(ECWDIR)\include \<br> -I$(ECWDIR)\include/NCSECW/API \<br> -I$(ECWDIR)\include/NCSECW/JP2 \<br> -I$(ECWDIR)\include/NCSECW/ECW<br>
ECWLIB = $(ECWDIR)\lib\vc90\$(PLATFORM_NAME)\<b>NCSEcwS.lib</b> </span><br><br></div><div><br></div>I'm not sure about the <span style="font-family:courier new,monospace">NCSECW_EXPORTS </span><span style="font-family:courier new,monospace"><span style="font-family:arial,helvetica,sans-serif">pre-processor definition. I've added it to the ECWFLAGS. Is that the correct location and the correct syntax?<br>
<br></span></span></div><span style="font-family:courier new,monospace"><span style="font-family:arial,helvetica,sans-serif">We used to compile MapWinGIS with the ECW dll as a delay loaded dll, but that is now giving me this error:</span></span><br>
<i>fatal error LNK1194: cannot delay-load 'NCSEcw.dll' due to import of
data symbol '"__declspec(dllimport) const NCS::CMutex::`vftable'"
(__imp_??_7CMutex@NCS@@6B@)'; link without /DELAYLOAD:NCSEcw.dll</i></div><span style="font-family:courier new,monospace"><span style="font-family:arial,helvetica,sans-serif">I've posted this on the Intergraph forum (<a href="http://geospatial.intergraph.com/Community/forums/p/1620/5299.aspx#5299">http://geospatial.intergraph.com/Community/forums/p/1620/5299.aspx#5299</a>) but don't have received any reply.<br>
<br></span></span></div><span style="font-family:courier new,monospace"><span style="font-family:arial,helvetica,sans-serif">When compiling gdal with the new nmake.local I can successfully open an ecw file with gdalinfo.exe, so that part is working.<br>
</span></span></div><span style="font-family:courier new,monospace"><span style="font-family:arial,helvetica,sans-serif">But when compiling MapWinGIS (using VS2008), which is statically linking gdal.lib I get these errors:<br>
<span style="font-family:courier new,monospace">error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall NCS::CString::~CString(void)" (__imp_??1CString@NCS@@QAE@XZ) referenced in function "public: virtual enum CPLErr __thiscall ECWDataset::SetMetadataItem(char const *,char const *,char const *)" (?SetMetadataItem@ECWDataset@@UAE?AW4CPLErr@@PBD00@Z) gdal.lib MapWinGIS</span><br>
<br></span></span></div><span style="font-family:courier new,monospace"><span style="font-family:arial,helvetica,sans-serif">Any help is much appreciated.<br></span></span><div><div><div><div><span style="font-family:courier new,monospace"><span style="font-family:arial,helvetica,sans-serif"><br>
</span></span><div><div><div><div><div><div><div><span style="font-family:arial,helvetica,sans-serif">Thanks,<br></span></div><div><span style="font-family:arial,helvetica,sans-serif">
<br>
Paul<br>
</span><br>
<div style="font-size:13.3px;font-family:Verdana,Arial,Helvetica,sans-serif"><div style="border:1px solid rgb(229,229,229);background-color:rgb(248,248,248);padding:0.8em 0.8em 0.3em"><div style="margin:0px 0px 8px"><p style="margin:0px">
<span><b><img style="float: left; margin-left: 5px; margin-right: 5px;" src="http://www.bontepaarden.nl/bontepaarden/images/newButton.png" alt="" height="120" width="160">Paul Meems </b><br><span>Release manager, configuration manager</span><br>
<span>and forum moderator of MapWindow GIS.</span><br><a href="http://www.mapwindow.org/" target="_blank"><span>www.mapwindow.org</span></a><br><br><span>Owner of MapWindow.nl - Support for</span><br><span>Dutch speaking users.</span><br>
<a href="http://www.mapwindow.nl/" target="_blank"><span>www.mapwindow.nl</span></a><br></span></p>
<p style="margin:0px"><b><br></b></p></div></div><img src="http://p1.wisestamp.com/pixel.png?p=mozilla&v=3.9.12&t=1322134056890&u=482737fd0c4ca423" height="1" width="1"></div>
</div>
</div></div></div></div></div></div></div></div></div></div></div>