gpt4 book ai didi

c++ - 在 xcode 5 中包含

转载 作者:太空宇宙 更新时间:2023-11-04 11:30:16 24 4
gpt4 key购买 nike

我正在尝试将一些 Android JNI 代码移植到 iOS,但出现错误

当我尝试在 XCode 5.1.1 中编译代码时找不到“字符串”文件

有人知道怎么解决吗?源是内联的,__cplusplus ifndef 是我在阅读其他一些答案后添加的(它没有帮助)。

/*
* saveload.h
* --------------------------
* Declares functions relating to saving and loading from files.
* This file is around for backwards compatibility, as we now use
* proto saving and loading instead.
*/

#ifndef SAVELOAD_H_INCLUDED
#define SAVELOAD_H_INCLUDED

#ifndef __cplusplus
#include <string>
#endif

最佳答案

我认为应该是:

#ifdef __cplusplus
#include <string>
#endif

查看生成文件日志。它的包含路径中必须有 C++ header 。

关于c++ - 在 xcode 5 中包含 <string>?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25028461/

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