OpenCV gnustl conflicts with C ++ _ dlib shared in Android NDK
I am trying to integrate OpenCV and dlib-android into the NDK. I can get OpenCV and dlib to work in separate projects, but the project breaks when they are both integrated.
This is my gradle config for dlib
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
...
externalNativeBuild {
cmake {
cppFlags "-std=c++11 -frtti -fexceptions"
arguments "-DANDROID_PLATFORM=android-16",
"-DANDROID_TOOLCHAIN=clang",
"-DANDROID_STL=c++_shared",
"-DANDROID_CPP_FEATURES=rtti exceptions"
}
}
sourceSets {
main {
jniLibs.srcDirs = ["src/main/jniLibs/dlib/libs"]
}
}
}
...
When I integrate openCV I get
undefined reference to 'cv :: CascadeClassifier :: detectMultiScale'
The solution, which according to this answer , should have stl asgnustl_shared
dlib with gnustl_shared
gives errors like std::exceptions
not found.
How do I go forward and integrate both?
I tried to recompile OpenCV with the help c++_shared
in CMake but ran into
fatal error: iostream: no such file or #include directory
source to share
No one has answered this question yet
See similar questions:
or similar: