error C3163 ??
-
Tuesday, August 21, 2007 12:16 AM
Visual C++ 9.0 Express Edition
error C3163 help~!
..\VC\INCLUDE\stdio.h(358) : error C3163: '_vsnprintf': attributes inconsistent with previous declaration
..\VC\INCLUDE\stdio.h(350) : see declaration of '_vsnprintf'
All Replies
-
Monday, September 03, 2007 11:26 PMI have the same problem using Visual Studio 2008 Team Edition when trying to recompile the AngelScript libraries for my projects.
I'm still looking into it, but I was hoping someone could shed light on this.
Thanks Adam -
Friday, September 07, 2007 2:23 PMHi,
me too I have the same problem when compiling with visual studio 2008 beta versio 2 standard edition.
Someone have any solution.
A show of my error:
and in stdio.h (358) :Code SnippetC:\Program 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'
Code Snippet__DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_ARGLIST_EX(int, __RETURN_POLICY_SAME, _CRTIMP, _snprintf, _vsnprintf, _Pre_notnull_ _Post_maybez_ char, _Out_cap_(_Count) _Post_maybez_, char, _Dest, _In_ size_t, _Count, _In_z_ _Printf_format_string_ const char *, _Format)
and in stdio.h (350) :
Code Snippet_Check_return_opt_ _CRT_INSECURE_DEPRECATE(vsnprintf_s) _CRTIMP int __cdecl vsnprintf(_Out_cap_(_MaxCount) char * _DstBuf, _In_ size_t _MaxCount, _In_z_ _Printf_format_string_ const char * _Format, va_list _ArgList);
Thanks -
Tuesday, November 27, 2007 8:46 PM
If someone still needs a solution for this (as I needed when I came here):
The VC9 CRT seems to define vsnprintf on its own, a simple shortcut that resolves to _vsnprintf. This conflicts with some third party libs (such like AngelScript) which define vsnprintf for their purposes. For AngelScript the solution is simpel: comment out the line
Code Block#define vsnprintf(a, b, c, d) _vsnprintf(a, b, c, d)in as_config.h, line 283. Works fine for AngelScript, it compiled without errors afterwards.
-
Friday, December 18, 2009 10:44 AMi am trying to compile bind and getting same error.
can someone help -
Monday, December 28, 2009 9:56 PMPlease look at config.h line 163 and comment that line out ( //#define vsnprintf _vsnprintf )
Note: If line 163 for you doesn't look the same, leave it alone and search for the line with vsnprintf in it

