I have a big project with hundreds of c++ files that I am supposed to port to Android. I am new to the project and NDK as well. I got rid of most errors and the ndk build progresses up to here:
Compile++ thumb : mylib <= MyApp.cpp
SharedLibrary : libmylib.so
./obj/local/armeabi/objs/mylib/MyApp.o: In function `MyClass::MyFunction(unsigned long, void*, unsigned long long)':
C:\Development/./jni/AClass.h:249: undefined reference to `MyClass::Function(unsigned long, void*, unsigned long long)'
.... plenty of these error messages here...
collect2: ld returned 1 exit status
/cygdrive/c/Android/android-ndk/android-ndk-r8/build/core/build-binary.mk:369: recipe for target `obj/local/armeabi/libmylib.so' failed
make: * [obj/local/armeabi/libmylib.so] Error 1
it even goes to "SharedLibrary : libmylib.so" now but then I get heaps of these errors "undefined reference" like above. The classes are included and the functions defined.
line 369 in build-binary.mk is:
@ $(call host-mkdir,$(dir $@))
but I don't know what that means. I read something about permission problems with shared libraries and set all files to allow everything but that didnt change anything. could it be that mkdir fails for some reason? Does anyone know what the problem could be?
Any help is greatly appreciated!
Here is my Android.mk file:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := mylib
LOCAL_SRC_FILES := MyApp.cpp
LOCAL_CFLAGS := -D_Android_ -D_Debug_
include $(BUILD_SHARED_LIBRARY)