_gnu_cxx::snprintf has not been declared
当我在我的cpp中包含字符串时。此错误出现在这一行:
using ::__gnu_cxx::snprintf;
cstdio按此顺序包含:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/string:47,
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/char_traits.h:46,
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:70,
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/iosfwd:45,
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/iosfwd:45,
答案 0 :(得分:3)
我通过在标题中添加#define _GLIBCXX_USE_C99_DYNAMIC 1来解决这个问题。