Issue
I have the latest android ndk installed. I am using Eclipse along with Sequoyah.
I am trying to use various things that should be found in stlport or gnustl libraries, but I keep getting errors that they cannot be found.
In JNI/Application.mk I only have
APP_STL := stlport_shared
I have tried stlport_static and the gnustl_static/shared and all get the same result.
In my Android.mk I have
LIB_TEST_DIR := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_PATH := $(LIB_TEST_DIR)
LOCAL_MODULE := testmod
LOCAL_MODULE_FILENAME := libtestmod
LOCAL_CPP_EXTENSION := .cxx .cpp .cc
LOCAL_C_INCLUDES := $(LOCAL_PATH)/libtest2/
LOCAL_CFLAGS := -DHAVE_CONFIG_H
LOCAL_SRC_FILES := test.cc
include $(BUILD_SHARED_LIBRARY)
In a header file that test.cc includes, I have
#include <cassert>
#include <algorithm>
#include <iosfwd>
But, when I build, it cannot find any of these. Any idea what I am doing wrong?
When I do a clean, I see this:
Clean: addiJNI [armeabi]
Clean: stlport_shared [armeabi]
Clean: stlport_static [armeabi]
So, it seems like it knew I wanted stlport. Similar thing happens if I use the gnu libs instead. But when I build even the simplest example, I get something like...
jni/test.cpp:4:19: error: cassert: No such file or directory
jni/test.cpp:6:21: error: algorithm: No such file or directory
jni/test.cpp:7:18: error: iosfwd: No such file or directory
make: *** [obj/local/armeabi/objs/addiJNI/addiJNI.o] Error 1
Solution
This was the problem, not sure why.
LOCAL_CPP_EXTENSION := .cxx .cpp .cc
It didn't like the .cxx at the beginning.
Answered By - corbin
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.