gpt4 book ai didi

iphone - 包含 出错

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:05:37 25 4
gpt4 key购买 nike

_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,

最佳答案

我通过在标题中添加#define _GLIBCXX_USE_C99_DYNAMIC 1 解决了这个问题。

关于iphone - 包含 <string> 时 <cstdio> 出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5402663/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com