swprintf和vswprintf没有声明?

Jak*_*les 10 c++ windows mingw botan

我试图用MinGW在Windows上编译Botan,并在编译期间收到以下错误:

c:\qt\2010.04\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/cwchar:159: error:
'::swprintf' has not been declared
c:\qt\2010.04\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/cwchar:166: error:
'::vswprintf' has not been declared
Run Code Online (Sandbox Code Playgroud)

为什么没有声明swprintf和vswprintf,我该如何解决这个问题呢?

car*_*org 11

试着投入

#undef __STRICT_ANSI__ 
Run Code Online (Sandbox Code Playgroud)

在包括stdio.h之前

  • 使用`-std = c ++ 0x`进行编译似乎甚至没有明确的`-ansi`(在你的MinGW GCC 4.4.0中).一个较新的GCC应该修复它(并使`-std = c ++ 0x`冗余)但我尚未检查. (4认同)