【发布时间】:2013-09-29 13:46:17
【问题描述】:
我正在使用 Eclipse for Mac 开发本机应用程序,但无法解析 std::string 或 std::map。
我已经不得不在路径中添加一些包含目录来处理 NDK 没有开箱即用地设置;目前我有
.../Development/android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.8/include
.../Development/android-ndk-r9/platforms/android-18/arch-arm/usr/include
.../vuforia-sdk-android-2-6-10/build/include
.../android-ndk-r9/sources/cxx-stl/system/include
设置为 C++ 符号路径,#include <string> 似乎工作正常。但是,所有对 std::string 的引用都没有解析,Eclipse 说
无法解析类型“std::string”。
我知道此代码可以构建,因为我在 Windows PC 上成功构建了它;这是某种描述的日食问题。我该怎么做才能使这些符号解析?
编辑 1:我查看了 <string> 内部,似乎它主要包含一堆其他包含,例如 #include <bits/c++config.h>。所有这些似乎都解决了,但我会看看是否能找到它们并确定std::string 的实际居住地。
编辑 2:我可以找到 std::basic_string,但找不到 std::string(目前)。
编辑 3:std::basic_string 在我的源代码中也不明显可见。
【问题讨论】:
-
我有同样的问题,fwiw
标签: android c++ eclipse macos android-ndk