在codeblocks IDE环境下,借助MinGW编译出现的error。
error: '::swprintf' has not been declared
error: '::vswprintf' has not been declared
查了查网上的资料在stackoverflow上有人回答这个问题。
在#include<>之前加上
#undef __STRICT_ANSI__
则问题解决了。可以build工程了现在。
网上有人说原因:
看了头文件发现这两个函数被__STRICT_ANSI__宏隔离了.而打开std=c++0x编译选项导致__STRICT_ANSI__被定义. 就找不到这两个函数了.