[gdal-dev] GDAL 2.1.3 with ECW support compile fails

Jeff McKenna jmckenna at gatewaygeomatics.com
Thu May 4 06:10:43 PDT 2017


On 2017-05-04 3:58 AM, Candy, Liam wrote:
> Hi,
>
>
>
> I’m hoping someone can help me. I’m trying to build the GDAL 2.1.3 with
> ECW support (using the Hexagon ERDAS ECW read only SDK v5.3.0).
>
>
>
> I’m building on Windows with Visual Studio 2015 v14.0.
>
>
>
> I’m getting the following type conversion errors that are breaking the
> build:
>
>
>
> …\gdal-2.1.3\frmts\ecw\ecwdataset.cpp(68): error C2440: 'initializing':
> cannot convert from 'NCS::CString' to 'char *'
>
> …\gdal-2.1.3\frmts\ecw\ecwdataset.cpp(68): note: No
> user-defined-conversion operator available that can perform this
> conversion, or the operator cannot be called
>
> …\gdal-2.1.3\frmts\ecw\ecwdataset.cpp(1425): error C2664: 'NCSError
> NCSReadEditInfo(const wchar_t *,NCSEditInfo **)': cannot convert
> argument 1 from 'char *' to 'const wchar_t *'
>
> …\gdal-2.1.3\frmts\ecw\ecwdataset.cpp(1425): note: Types pointed to are
> unrelated; conversion requires reinterpret_cast, C-style cast or
> function-style cast
>
> …\gdal-2.1.3\frmts\ecw\ecwdataset.cpp(1485): error C2664: 'NCSError
> NCSWriteEditInfo(const wchar_t *,NCSEditInfo *,void (__cdecl
> *)(UINT64,UINT64,void *),BOOLEAN (__cdecl *)(void *),void *)': cannot
> convert argument 1 from 'char *' to 'const wchar_t *'
>
> …\gdal-2.1.3\frmts\ecw\ecwdataset.cpp(1485): note: Types pointed to are
> unrelated; conversion requires reinterpret_cast, C-style cast or
> function-style cast
>
>
>
> Not sure what I’m doing wrong. Any help would be greatly appreciated.
>
>
>
> Thanks in advance,
>
> Liam.
>

Hi Liam,

I often build MS4W now with ECW support using Visual Studio 2015, mostly 
using the old version 3.3 (read/write) SDK, but also sometimes with the 
4.x read-only SDK (and I keep my build notes updated at 
https://trac.osgeo.org/gdal/wiki/ECW).  I may not have hit your exact 
issue (and version yet), but it would be great if you could also post 
your notes (and gotchyas) on that page as well, so the next person 
coming along doesn't hit your same issue, or at least that the issue is 
known.  thanks!

-jeff





-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/






More information about the gdal-dev mailing list