Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Posted
Updated 13-Feb-10 3:03am
v2

I figured it out :D

It was an header that was redefining the _vsnprintf function
I commented it and it compiles now
 
Share this answer
 
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.
 
Share this answer
 
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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900