opencv 修改编译生成的opencv_java3.so

在目录下运行以下两条指令:

1.

/home/zienon/work/opencv/OpenCV-3.1/opencv/platforms/build_android_arm/modules/java

/home/zienon/android/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc  -fPIC -fexceptions -frtti -fpic -Wno-psabi --sysroot=/home/zienon/android/android-ndk-r10e/platforms/android-8/arch-arm -funwind-tables -finline-limit=64 -fsigned-char -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fdata-sections -ffunction-sections -Wa,--noexecstack    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -fomit-frame-pointer  -fvisibility-inlines-hidden -mthumb -fomit-frame-pointer -fno-strict-aliasing -O3 -DNDEBUG  -DNDEBUG  -Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now  -shared -o ../../lib/armeabi-v7a/libopencv_java3.so CMakeFiles/opencv_java.dir/generator/src/cpp/converters.cpp.o CMakeFiles/opencv_java.dir/generator/src/cpp/utils.cpp.o CMakeFiles/opencv_java.dir/generator/src/cpp/Mat.cpp.o CMakeFiles/opencv_java.dir/generator/src/cpp/jni_part.cpp.o CMakeFiles/opencv_java.dir/__/core/misc/java/src/cpp/core_manual.cpp.o CMakeFiles/opencv_java.dir/__/features2d/misc/java/src/cpp/features2d_converters.cpp.o CMakeFiles/opencv_java.dir/core.cpp.o CMakeFiles/opencv_java.dir/imgproc.cpp.o CMakeFiles/opencv_java.dir/ml.cpp.o CMakeFiles/opencv_java.dir/photo.cpp.o CMakeFiles/opencv_java.dir/video.cpp.o CMakeFiles/opencv_java.dir/imgcodecs.cpp.o CMakeFiles/opencv_java.dir/videoio.cpp.o CMakeFiles/opencv_java.dir/objdetect.cpp.o CMakeFiles/opencv_java.dir/features2d.cpp.o CMakeFiles/opencv_java.dir/calib3d.cpp.o -L/home/zienon/work/opencv/OpenCV-3.1/opencv/platforms/build_android_arm/install/libs/armeabi-v7a -Wl,-whole-archive ../../lib/armeabi-v7a/libopencv_core.a ../../lib/armeabi-v7a/libopencv_flann.a ../../lib/armeabi-v7a/libopencv_imgproc.a ../../lib/armeabi-v7a/libopencv_ml.a ../../lib/armeabi-v7a/libopencv_photo.a ../../lib/armeabi-v7a/libopencv_video.a ../../lib/armeabi-v7a/libopencv_imgcodecs.a ../../lib/armeabi-v7a/libopencv_videoio.a ../../lib/armeabi-v7a/libopencv_highgui.a ../../lib/armeabi-v7a/libopencv_objdetect.a ../../lib/armeabi-v7a/libopencv_features2d.a ../../lib/armeabi-v7a/libopencv_calib3d.a ../../lib/armeabi-v7a/libopencv_shape.a ../../lib/armeabi-v7a/libopencv_superres.a ../../lib/armeabi-v7a/libopencv_stitching.a ../../lib/armeabi-v7a/libopencv_videostab.a -Wl,-no-whole-archive -ldl -lm -llog ../../3rdparty/lib/armeabi-v7a/libtbb.a -ljnigraphics ../../lib/armeabi-v7a/libopencv_objdetect.a ../../lib/armeabi-v7a/libopencv_photo.a ../../lib/armeabi-v7a/libopencv_video.a ../../lib/armeabi-v7a/libopencv_calib3d.a ../../lib/armeabi-v7a/libopencv_features2d.a ../../lib/armeabi-v7a/libopencv_flann.a ../../lib/armeabi-v7a/libopencv_ml.a ../../lib/armeabi-v7a/libopencv_highgui.a ../../lib/armeabi-v7a/libopencv_videoio.a ../../lib/armeabi-v7a/libopencv_imgcodecs.a ../../lib/armeabi-v7a/libopencv_imgproc.a ../../lib/armeabi-v7a/libopencv_core.a ../../3rdparty/lib/armeabi-v7a/liblibjpeg.a ../../3rdparty/lib/armeabi-v7a/liblibwebp.a ../../3rdparty/lib/armeabi-v7a/liblibpng.a ../../3rdparty/lib/armeabi-v7a/liblibtiff.a ../../3rdparty/lib/armeabi-v7a/liblibjasper.a ../../3rdparty/lib/armeabi-v7a/libIlmImf.a -lz -llog ../../3rdparty/lib/armeabi-v7a/libtbb.a -lc -ldl -lm  "/home/zienon/android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/libgnustl_static.a" "/home/zienon/android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/libsupc++.a" -lm


2.

/home/zienon/android/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip --strip-unneeded /home/zienon/work/opencv/OpenCV-3.1/opencv/platforms/build_android_arm/lib/armeabi-v7a/libopencv_java3.so


注:生成后的libopencv_java3.so 可以被任意修改成你想要命名的库

你可能感兴趣的:(opencv)