vs 202 编译通过,vs2015卡住无法通过,无法解析的外部符号 __vsnwprintf_s,

1>------ 已启动生成: 项目: XuglassForm, 配置: Debug Win32 ------
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(1188,5): warning MSB8012: TargetPath(C:\Users\hxy-pc\Desktop\XuglassForm\Debug\XuglassForm.exe) does not match the Linker's OutputFile property value (). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
1>odbccp32.lib(dllload.obj) : error LNK2019: 无法解析的外部符号 __vsnwprintf_s,该符号在函数 _StringCchPrintfW 中被引用
1>XuglassForm.exe : fatal error LNK1120: 1 个无法解析的外部命令
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========

是不是用了unicode字符集?

他说__vsnwprintf_s这个符号没找到,你在哪用了这个函数的?

可能是工程属性的配置错误导致的,你可以考虑对比一下 VS20X2 和 VS2015 的工程属性有什么异同。

宽字符集和窄字符集所致。。。把15上的工程设置字符集和02的一样

我把15的工具集改成v110就没问题了,你试试。

遇到同样问题,,楼主最后怎么解决的呀

add legacy_stdio_definitions.lib to link dependencies

解决办法:
1)在vs2015安装文件夹Lib文件放入odbccp32.lib文件
2)打开编译文件,项目\属性\连接器\输入\附加依赖里面输入
D:\Program Files (x86)\Microsoft Visual Studio 14.0\lib\odbccp32.lib