Dat Nguyen wrote:
Well, It seems that I can build and run fine on iOS, but as Shuaiying Hou said, Android made me confused. Do I have to add every source file from library into the Android.mk? And how to do that, do I have to treat it (C files) as usual C++ files?
There is a Android.mk file in your proj.android/jni folder. In the most simple situation you have to modify this file, add .h into LOCAL_C_INCLUDES, .cpp/.c into LOCAL_SRC_FILES if they exists, and your library name into LOCAL_LDLIBS like -l. But if this is a static library(.a) you have to add its name into LOCAL_WHOLE_STATIC_LIBRARIES. You may also add it in LOCAL_SHARED_LIBRARIES instead if it’s a shared library. I think you have to add .h and .c files only in your case since you already have source code instead of .a or .so files.
C files might meet some issue when compiling due to NDK version. Just have a try first.