我正在尝试将一些Android JNI代码移植到iOS,但我得到了错误
当我尝试在XCode 5.1.1中编译代码时找不到‘'string’文件
有人知道怎么解决这个问题吗?源代码是内联的,__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发布于 2014-07-30 11:57:26
我认为应该是:
#ifdef __cplusplus
#include <string>
#endif请参阅makefile日志。它必须在其包含路径中具有C++标头。
发布于 2014-07-31 03:05:18
问题最终是我的C++文件是.cc而不是.mm文件。
https://stackoverflow.com/questions/25028461
复制相似问题