从VS2003到VS2008 [英] From VS2003 to VS2008

查看:70
本文介绍了从VS2003到VS2008的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VS2003中有一个应用程序,我想使其在VS2008中工作,但是我遇到了此错误
1> c:\ Program Files(x86)\ Microsoft Visual Studio 9.0 \ VC \ include \ stdio.h(358):错误C3163:``_vsnprintf'':与先前声明不一致的属性
1> c:\ Program Files(x86)\ Microsoft Visual Studio 9.0 \ VC \ include \ stdio.h(350):请参见``_vsnprintf''的声明

我该如何解决?
谢谢

Hi i have an application in VS2003 and i want to make it work in VS2008, but i''m getting this error
1>c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdio.h(358) : error C3163: ''_vsnprintf'': attributes inconsistent with previous declaration
1> c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdio.h(350) : see declaration of ''_vsnprintf''

How can i solve this ?
Thanks

推荐答案

我知道了:D

它是重新定义_vsnprintf函数的标头
我对其进行了评论,并且现在可以对其进行编译
I figured it out :D

It was an header that was redefining the _vsnprintf function
I commented it and it compiles now


距离我不得不处理C ++已经有几年了,但是我怀疑这意味着您必须对自己的C/C进行清理/重建解决方案.您可能有一个从旧编译器链接到的lib文件.
It''s been a few years since I had to deal with C++, but I suspect it means that you have to do a clean/rebuild of your solution. You probably have a lib file being linked in from the old compiler.


在移至VS2008之后,是否完全重新构建了应用程序?我知道上述功能现在已被弃用,Microsoft建议改为使用_vsnprintf_s()版本.自从引入这一点以来,他们还添加了许多宏,这些宏应该简化过渡".根据我的经验,建议彻底清理项目并在新版本下进行重建.
Did you rebuild your application completely after you moved to VS2008? I know that functions like the above are now deprecated and Microsoft recommends using the _vsnprintf_s() versions instead. Since introducing this they also added lots of macros which are supposed to ''ease the transition''. My experience suggests cleaning the project thoroughly and rebuilding under the new version.


这篇关于从VS2003到VS2008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆