<cstdio> error when turning on <string>

_gnu_cxx::snprintf has not been declared 

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

 using ::__gnu_cxx::snprintf; 

cstdio is turned on in the following order:

 /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, 
+4
source share
1 answer

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

+3
source

Source: https://habr.com/ru/post/1344894/


All Articles