great, thanks for updating the wiki! This is great for your karma, and
really helps the next person hitting your issue.
Please always reply to the mailing list. Have a nice weekend,
-jeff
On 2017-05-05 6:06 AM, Candy, Liam wrote:
Hi Jeff,
I was going to update the wiki, but have issues logging in. Anyway, the
problem was resolved by
ECWDIR = C:\Users\Blah\AppData\Local\Hexagon\ERDAS_ECW_JPEG_2000_SDK_53
ECWFLAGS = -DECWSDK_VERSION=53 \
-I$(ECWDIR)\include \
-I$(ECWDIR)\include/NCSECW/api -I$(ECWDIR)\include/NCSECW/jp2 \
-I$(ECWDIR)\include/NCSECW/ecw
ECWLIB = $(ECWDIR)\lib\vc120\Win32\NCSEcw.lib
The main issue was in the DECWSDK_VERSION that I hadn’t configured
correctly. The ECWLIB also changed for 5.3 vs 4.1
I then ran into a linking error using VS 2015. The 5.3 SDK appears to
have been built with an older version of VS, so the linker gives the
following error;
odbccp32.lib(dllload.obj) : error LNK2019: unresolved external symbol
__vsnwprintf_s referenced in function _StringCchPrintfW
This is resolved by including the legacy_stdio_definitions.lib library
as an external library in the build. Full resolution to this issue is here;
https://connect.microsoft.com/VisualStudio/feedback/details/1039102
Best regards,
Liam.
Liam Candy D +27 11 638 2078 M +27 11 282 8658 Ext 8113 2078
*From:*gdal-dev [mailto:[email protected]] *On Behalf Of
*Jeff McKenna
*Sent:* Thursday, May 4, 2017 3:11 PM
*To:* [email protected]
*Subject:* Re: [gdal-dev] GDAL 2.1.3 with ECW support compile fails
This message originated outside Anglo American
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
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev