Closed shermes91 closed 5 years ago
i did the ndk-build in ceres-solver/jni/ and got the libceres.a file in ceres-solver/obj/local/arch. Do I need an extra step to compile ceres?
I didn't change the Android.mk file. So it is the original file downloaded from git.
@shermes91 Android.mk doesn't include all soure files.
I changed the endings of the mk files, because mk-files are not allowed to upload.
Do you mean, the output of my build? I'm new to this stuff, so sorry for my questions. But thanks for your help!
Hi,
ich wollte deine Arbeit auf meinem Galaxy S7 testen. Der NDK-build lief auch sauber durch, aber beim Starten der Anwendungen bekomme ich leider sehr viele "undefined Reference" Probleme. Hast du eine Ahnung woran dies liegen könnte?
Ein kleiner Ausschnitt aus der Fehlermeldung:
[1/1] Linking CXX shared library ........\build\intermediates\cmake\debug\obj\arm64-v8a\libNativeLib.so FAILED: cmd.exe /C "cd . && E:\Programme\sdk\ndk-bundle\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64\bin\aarch64-linux-android-g++.exe --sysroot=E:/Programme/sdk/ndk-bundle/sysroot -fPIC -isystem E:/Programme/sdk/ndk-bundle/sysroot/usr/include/aarch64-linux-android -D__ANDROID_API__=24 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -std=gnu++11 -frtti -fopenmp -fexceptions -O3 -funsafe-math-optimizations -O2 -DNDEBUG -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a --sysroot E:/Programme/sdk/ndk-bundle/platforms/android-24/arch-arm64 -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libNativeLib.so -o ........\build\intermediates\cmake\debug\obj\arm64-v8a\libNativeLib.so CMakeFiles/NativeLib.dir/src/main/cpp/jni/nativelib.cpp.o src/main/cpp/VINS_Android/libVINS_Android.a -llog libs/VINS-Mobile-master/VINS_ios/libVINSMobile.a libs/VINS-Mobile-master/VINS_ios/loop/libLoop.a libs/VINS-Mobile-master/ThirdParty/DBoW/libDBoW.a libs/VINS-Mobile-master/VINS_ios/libVINSMobile.a libs/VINS-Mobile-master/VINS_ios/loop/libLoop.a libs/VINS-Mobile-master/ThirdParty/DBoW/libDBoW.a ../../../../libs/VINS-Mobile-master/VINS_ThirdPartyLib/ceres-solver/obj/local/arm64-v8a/libceres.a libs/VINS-Mobile-master/VINS_ios/delaunay/libDelaunay.a libs/VINS-Mobile-master/ThirdParty/DVision/libDVision.a libs/VINS-Mobile-master/ThirdParty/DUtils/libDUtils.a -landroid E:/libraries/OpenCV-android-sdk/sdk/native/staticlibs/arm64-v8a/libopencv_shape.a E:/libraries/OpenCV-android-sdk/sdk/native/staticlibs/arm64-v8a/libopencv_ml.a E:/libraries/OpenCV-android-sdk/sdk/native/staticlibs/arm64-v8a/libopencv_dnn.a E:/libraries/OpenCV-android-sdk/sdk/native/3rdparty/libs/arm64-v8a/liblibprotobuf.a E:/libraries/OpenCV-android-sdk/sdk/native/staticlibs/arm64-v8a/libopencv_objdetect.a E:/libraries/OpenCV-android-sdk/sdk/native/staticlibs/arm64-v8a/libopencv_superres.a E:/libraries/OpenCV-android-sdk/sdk/native/staticlibs/arm64-v8a/libopencv_stitching.a E:/libraries/OpenCV-android-sdk/sdk/native/staticlibs/arm64-v8a/libopencv_videostab.a E:/libraries/OpenCV-android-sdk/sdk/native/staticlibs/arm64-v8a/libopencv_calib3d.a E:/libraries/OpenCV-android-sdk/sdk/native/staticlibs/arm64-v8a/libopencv_features2d.a E:/libraries/OpenCV-android-sdk/sdk/native/staticlibs/arm64-v8a/libopencv_highgui.a E:/libraries/OpenCV-android-sdk/sdk/native/staticlibs/arm64-v8a/libopencv_videoio.a E:/libraries/OpenCV-android-sdk/sdk/native/staticlibs/arm64-v8a/libopencv_imgcodecs.a E:/libraries/OpenCV-android-sdk/sdk/native/3rdparty/libs/arm64-v8a/liblibjpeg.a E:/libraries/OpenCV-android-sdk/sdk/native/3rdparty/libs/arm64-v8a/liblibwebp.a E:/libraries/OpenCV-android-sdk/sdk/native/3rdparty/libs/arm64-v8a/liblibpng.a E:/libraries/OpenCV-android-sdk/sdk/native/3rdparty/libs/arm64-v8a/liblibtiff.a E:/libraries/OpenCV-android-sdk/sdk/native/3rdparty/libs/arm64-v8a/liblibjasper.a E:/libraries/OpenCV-android-sdk/sdk/native/3rdparty/libs/arm64-v8a/libIlmImf.a E:/libraries/OpenCV-android-sdk/sdk/native/staticlibs/arm64-v8a/libopencv_flann.a E:/libraries/OpenCV-android-sdk/sdk/native/staticlibs/arm64-v8a/libopencv_video.a E:/libraries/OpenCV-android-sdk/sdk/native/staticlibs/arm64-v8a/libopencv_photo.a E:/libraries/OpenCV-android-sdk/sdk/native/staticlibs/arm64-v8a/libopencv_imgproc.a E:/libraries/OpenCV-android-sdk/sdk/native/staticlibs/arm64-v8a/libopencv_core.a -llog -lz E:/libraries/OpenCV-android-sdk/sdk/native/3rdparty/libs/arm64-v8a/libcpufeatures.a E:/libraries/OpenCV-android-sdk/sdk/native/3rdparty/libs/arm64-v8a/libtbb.a -lc -ldl -lm E:/libraries/OpenCV-android-sdk/sdk/native/3rdparty/libs/arm64-v8a/libtegra_hal.a -latomic -lm "E:/Programme/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/libgnustl_static.a" && cd ." libs/VINS-Mobile-master/VINS_ios/libVINSMobile.a(VINS.cpp.o): In function `VINS::solve_ceres(int)':
C:\Users\Sebastian\AndroidStudioProjects\VINS-Mobile-Android\VINS_Mobile_AndroidPort\app\libs\VINS-Mobile-master\VINS_ios/VINS.cpp:536: undefined reference to `ceres::Problem::AddResidualBlock(ceres::CostFunction, ceres::LossFunction, std::vector<double, std::allocator<double> > const&)'