Hanno installato android-ndk-r7 e provato a compilare il file .cpp.Impossibile includere iostream in Android perché?
#include <iostream>
using namespace std;
int main (int argc, char ** argv)
{
cout <<"Hello World.."<<endl;
}
Eseguito seguente comando: Got nella cartella JNI, ed eseguito
#ndk-build
Got seguente errore:
/home/jelari/Desktop/androidDevelopment/android-ndk-r7/DCF/jni/test1.cpp:1:20: error: iostream: No such file or directory
/home/jelari/Desktop/androidDevelopment/android-ndk-r7/DCF/jni/test1.cpp: In function 'int main(int, char**)':
/home/jelari/Desktop/androidDevelopment/android-ndk-r7/DCF/jni/test1.cpp:8: error: 'cout' was not declared in this scope
/home/jelari/Desktop/androidDevelopment/android-ndk-r7/DCF/jni/test1.cpp:8: error: 'endl' was not declared in this scope
make: *** [/home/jelari/Desktop/androidDevelopment/android-ndk-r7/DCF/obj/local/armeabi/objs/test1/test1.o] Error 1
Che cosa sto facendo di sbagliato?
file di mio Android.mk assomiglia:
# A simple test for the minimal standard C++ library
#
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := test1
LOCAL_SRC_FILES := test1.cpp
include $(BUILD_EXECUTABLE)
e Application.mk del file si presenta come:
# Build both ARMv5TE and ARMv7-A machine code.
APP_ABI := armeabi armeabi-v7a
di farmi notare l'errore?
@ Nick, Vergogna su di me :(. Shoul Ho fatto questo, piuttosto digitando. Scusate!!. – Whoami
Ah ah ah ah ah - l'abbiamo fatto tutti! – Nick