我正在使用MSVC 2015的64位命令提示符从源代码编译GDAL。我的电脑是Windows 8系统。在编译过程中,我遇到了以下错误:
Creating library gdal_i.lib and object gdal_i.exp
odbccp32.lib(dllload.obj) : error LNK2019: unresolved external symbol _vsnwprintf_s referenced in function StringCchPrintfW
gdal201.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'
Stop.
我在Microsoft网站和GDAL Git问题部分上读到,这是2014 MSVC和MSVC 2015预发布版本的问题,但这个问题应该在MSVC 2015最终版之前得到解决。
- https://github.com/mapbox/windows-builds/issues/53
- 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
我似乎不是唯一遇到这个问题的人,但我也没有看到解决方案(除了回退到旧版本的MSVC,比如2013)。有人成功使用MSVC 2015(64位)构建GDAL吗?