开发者

Error in <cstdio> when <string> is included

开发者 https://www.devze.com 2023-02-18 23:21 出处:网络
_gnu_cxx::snprintf has not been declared when I include string in my cpp. This error is inon this line:
_gnu_cxx::snprintf has not been declared

when I include string in my cpp. This error is in on this line:

using ::__gnu_cxx::snprintf;

cstdio is include in this order:

/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/c++/4.2.1/string:47,
/Developer/Platforms/iPhoneOS.platform/De开发者_开发知识库veloper/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,


I solved this by adding #define _GLIBCXX_USE_C99_DYNAMIC 1 in my header.

0

精彩评论

暂无评论...
验证码 换一张
取 消