PDA

View Full Version : VS 2008 _vsnprintf declaration conflict


WorldZone
12-17-2007, 07:01 AM
Hello, I am trying to compile zone with VS 2008 Express for the first time, and ran into the following error:


Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(358) : error C3163:
'_vsnprintf': attributes inconsistent with previous declaration
C:\Program Files\Microsoft Visual Studio
9.0\VC\include\stdio.h(350) : see declaration of '_vsnprintf'


I can't find this previous declaration that is causing a conflict!


Any ideas?

Thanks for any help! :)

Derision
12-17-2007, 09:54 PM
I was trying to get EQEmu to compile at the weekend with 2008 express. To get around this particular problem, based on the info in this post:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2031152&SiteID=1

I did a Find/Replace in files and replaced all occurrences of:

#define vsnprintf _vsnprintf

with nothing, i.e. delete all occurrences of that #define.

It seems the vsnprintf function was called _vsnprintf in previous versions of Visual C++, hence the need for that define.

WorldZone
12-18-2007, 09:52 AM
Thanks, Derision. I did a similar thing. In types.h I commented out that line and it compiled. However, it doesn't run properly, so I've reverted back to 2005 for now.