I'm using Visual Studio 2010 to open and build the GDAL 1.10 source (using the "makegdal10.sln"). This builds without an issue.
Now I want to include the ECW support by including the ECW v5.0 SDK (downloaded from Intergraph). It is installed to "C:\Intergraph\ECWSDK" and the relevant nmake.opt now looks as follows:
ECWDIR = "C:\Intergraph\ECWSDK"
ECWFLAGS = -DECWSDK_VERSION=50 \
-I$(ECWDIR)\include \
-I$(ECWDIR)\include/NCSECW/api -I$(ECWDIR)\include/NCSECW/jp2 \
-I$(ECWDIR)\include/NCSECW/ecw
ECWLIB = $(ECWDIR)\lib\vc90\win32\NCSEcw.lib
However when building I get the following errors and have no idea what it means:
Error 6 error LNK1120: 2 unresolved externals (file)gdal110.dll
Error 5 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >::~basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >(void)" (__imp_??1?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@XZ) referenced in function "private: void __thiscall ECWDataset::WriteHeader(void)" (?WriteHeader@ECWDataset@@AAEXXZ) (file)ecwdataset.obj
Error 4 error LNK2019: unresolved external symbol "__declspec(dllimport) public: wchar_t const * __thiscall std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >::c_str(void)const " (__imp_?c_str@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEPB_WXZ) referenced in function "public: virtual enum CPLErr __thiscall ECWDataset::SetMetadataItem(char const *,char const *,char const *)" (?SetMetadataItem@ECWDataset@@UAE?AW4CPLErr@@PBD00@Z) (file)gdal-1.10.1\ecwdataset.obj
Error 8 error MSB3073: The command "cd C:\Will\Mapserver\gdal-1.10.1\ && nmake -f makefile.vc MSVC_VER=1500 DEBUG=1 && nmake -f makefile.vc MSVC_VER=1500 DEBUG=1 install" exited with code 2. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Target
Error 7 error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.EXE"' : return code '0x460' ...\gdal-1.10.1\NMAKE makegdal