2012-05-28 78 views
1
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头文件! 在此先感谢。关于iostream在android的问题NDK

回答

2

APP_STL指令需要进入Application.mk文件。

请阅读文档更仔细地(在文档/ CPLUSPLUS-的support.html文件):

但是,您可以通过可变APP_STL设置到别的你Application.mk东西选择不同的实现中,例如:

APP_STL:= stlport_static

+0

非常感谢:)) – Manroop