I need to import a single function written in a C file in an android studio project. This function call others functions located in anothers files (50+ C files and headers in total).
This project already contains a single C++ file as I am using NDK to compile OpenCV4android.
I've used Mingw and GCC to compile a shared libraries (libfinal.so) but once i try to import them thanks to NDKbuild i got this meaningless error :
Error:Execution failed for task ':app:ndkBuild'.
> Process 'command 'C:/SDK/ndk-bundle/ndk-build.cmd'' finished with non-zero exit value 2
Here is the Android.mk file :
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
/some opencv stuff/
include $(CLEAR_VARS)
LOCAL_MODULE := final
LOCAL_SRC_FILES := libfinal.so
LOCAL_EXPORT_C_INCLUDES := C:\SDK\NDKOpencvTest1\app\src\main\jni\include
include $(PREBUILT_SHARED_LIBRARY)
The last line is the one giving me the error.
Here is the tree hierarchy:
https://i.sstatic.net/JD3Pt.jpg
I've also tried this solution without success: How to build FFmpeg (ver 3.1.1) on Android Studio (ver 2.1.2)
I've been searching what I am doing wrong for hours..
Thanks a lot for the help!