[gdal-dev] Troubles with VS2015

Even Rouault even.rouault at spatialys.com
Wed Sep 14 08:10:30 PDT 2016


Joaquim,

> odbccp32.lib(dllload.obj) : error LNK2019: unresolved external symbol
> _vsnwprintf_s referenced in function StringCchPrintfW
> gdal_w64.dll : fatal error LNK1120: 1 unresolved externals
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
> Studio 14.0\VC\BIN\amd64\link.EXE"' : return code '0x460'
> 
> 
> but odbccp32.lib is a 'system' lib. Any idea on what this is?
> BTW, it still builds fine with VS2013

Did you specify MSVC_VER=1900 in the nmake command line ?

See this extract of nmake.opt:

!IFDEF ODBC_SUPPORTED
!IF $(MSVC_VER) >= 1900
# legacy_stdio_definitions.lib : 
https://connect.microsoft.com/VisualStudio/feedback/details/1134693/vs-2015-
ctp-5-c-vsnwprintf-s-and-other-functions-are-not-exported-in-appcrt140-dll-
breaking-linkage-of-static-libraries
ODBCLIB = legacy_stdio_definitions.lib odbc32.lib odbccp32.lib user32.lib
!ELSE
ODBCLIB = odbc32.lib odbccp32.lib user32.lib
!ENDIF
!ENDIF

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list