In the compile process of IPP 6.1 sample code-audio-video-codecs, an error is reported:
Vm_file_win.c (1173): Error c2198: 'vswprintf': Too few arguments for call
Vswprintf is a macro. by viewing the definition of vswprintf, we can find that there are different definitions in its VC installation directory:
Int _ cdecl _ vswprintf (
Wchar_t * string,
Const wchar_t * format,
Va_list AP
);
Int _ cdecl vswprintf (
Wchar_t * string,
Size_t count,
Const wchar_t * format,
Va_list AP
);
The difference is that the latter has an additional parameter "size_t count", indicating the maximum length allowed by the buffer.
Here is an explanation in msdn:
In Visual C ++ 2005,SwprintfConforms to the iso c standard, which requires the second parameter,
Count, of TypeSize_t. To force the old nonstandard behavior, define
_ Crt_non_conforming_swprintfs. In a future version, the old behavior may be removed, so code shocould be changed to use the new conformant behavior.
Therefore, the latter is designed to be compatible with iso c standard. If you need to use an older version provided by Microsoft, you need to add the macro definition:
_ Crt_non_conforming_swprintfs