关于android NDK中的iostream的问题 [英] Issue regarding iostream in android NDK
本文介绍了关于android NDK中的iostream的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
While trying to execute a program based on C++ in android via NDK platform, the compilation is giving error that 'iostream' and 'vector' header files are not found, as I have included both of them in my C++ code.
M using android-ndk-r5b and compiling it with Cygwin.
I have seen most of the header files (even iostream & vector) in the folder **root\android-ndk-r5b\sources\cxx-stl\gnu-libstdc++\include\** but dont know why its still showing the error.
I have to fetch some header files(*.h) and some cpp files also for my program, also guide me where to place the header files & how to mention them in make file.
My android make file is:
**ANDROID.MK**
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := NDK1
FILE_LIST := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%)
APP_STL := gnustl_static
APP_STL := stlport_static
include $(BUILD_SHARED_LIBRARY)
我已经搜索了,但仍然没有找到如何在此android.mk中指定头文件的命令! 预先感谢.
I have searched but still dont found the command how to specify the header files in this android.mk ! Thanks in advance.
推荐答案
APP_STL
指令需要进入Application.mk
文件.
请更仔细地阅读文档(在docs/CPLUSPLUS-SUPPORT.html文件中):
Please read the documentation more carefully (in docs/CPLUSPLUS-SUPPORT.html file):
不过,您可以通过将变量APP_STL设置为Application.mk中的其他内容来选择其他实现,例如:
You can however select a different implementation by setting the variable APP_STL to something else in your Application.mk, for example:
APP_STL:= stlport_static
APP_STL := stlport_static
这篇关于关于android NDK中的iostream的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文