android-libjpeg-turbo icon indicating copy to clipboard operation
android-libjpeg-turbo copied to clipboard

How to make .so shared library use your project ?

Open tingfengainiaini opened this issue 10 years ago • 1 comments

How to make .so shared library use your project ?

tingfengainiaini avatar Dec 23 '15 06:12 tingfengainiaini

I am a newbie to android NDK. Just editing the last line of Android.mk file to "include $(BUILD_SHARED_LIBRARY)" failed the ndk-build. When make armabi/libjpeg-turbo.so, it gives out undefined reference error, and stopped build.

……
[armeabi] Compile thumb  : sohucs-jpeg <= jdarith.c
[armeabi] Compile thumb  : sohucs-jpeg <= turbojpeg.c
[armeabi] Compile thumb  : sohucs-jpeg <= transupp.c
[armeabi] Compile thumb  : sohucs-jpeg <= jdatadst-tj.c
[armeabi] Compile thumb  : sohucs-jpeg <= jdatasrc-tj.c
[armeabi] SharedLibrary  : libsohucs-jpeg.so
D:/eclipse/workspace/SohuJpeg/jni/vendor/libjpeg-turbo/libjpeg-turbo-1.4.2/jccolor.c:603: error: undefined reference to 'jsimd_can_rgb_gray'
D:/eclipse/workspace/SohuJpeg/jni/vendor/libjpeg-turbo/libjpeg-turbo-1.4.2/jccolor.c:658: error: undefined reference to 'jsimd_can_rgb_ycc'
D:/eclipse/workspace/SohuJpeg/jni/vendor/libjpeg-turbo/libjpeg-turbo-1.4.2/jccolor.c:718: error: undefined reference to 'jsimd_rgb_gray_convert'
D:/eclipse/workspace/SohuJpeg/jni/vendor/libjpeg-turbo/libjpeg-turbo-1.4.2/jccolor.c:718: error: undefined reference to 'jsimd_rgb_ycc_convert'
D:/eclipse/workspace/SohuJpeg/jni/vendor/libjpeg-turbo/libjpeg-turbo-1.4.2/jcdctmgr.c:360: error: undefined reference to 'jsimd_quantize'
D:/eclipse/workspace/SohuJpeg/jni/vendor/libjpeg-turbo/libjpeg-turbo-1.4.2/jcdctmgr.c:360: error: undefined reference to 'jsimd_quantize'
D:/eclipse/workspace/SohuJpeg/jni/vendor/libjpeg-turbo/libjpeg-turbo-1.4.2/jcdctmgr.c:632: error: undefined reference to 'jsimd_can_fdct_islow'
D:/eclipse/workspace/SohuJpeg/jni/vendor/libjpeg-turbo/libjpeg-turbo-1.4.2/jcdctmgr.c:641: error: undefined reference to 'jsimd_can_fdct_ifast'
D:/eclipse/workspace/SohuJpeg/jni/vendor/libjpeg-turbo/libjpeg-turbo-1.4.2/jcdctmgr.c:650: error: undefined reference to 'jsimd_can_fdct_float'
D:/eclipse/workspace/SohuJpeg/jni/vendor/libjpeg-turbo/libjpeg-turbo-1.4.2/jcdctmgr.c:670: error: undefined reference to 'jsimd_can_convsamp'
D:/eclipse/workspace/SohuJpeg/jni/vendor/libjpeg-turbo/libjpeg-turbo-1.4.2/jcdctmgr.c:674: error: undefined reference to 'jsimd_can_quantize'
D:/eclipse/workspace/SohuJpeg/jni/vendor/libjpeg-turbo/libjpeg-turbo-1.4.2/jcdctmgr.c:682: error: undefined reference to 'jsimd_can_convsamp_float'
D:/eclipse/workspace/SohuJpeg/jni/vendor/libjpeg-turbo/libjpeg-turbo-1.4.2/jcdctmgr.c:686: error: undefined reference to 'jsimd_can_quantize_float'
D:/eclipse/workspace/SohuJpeg/jni/vendor/libjpeg-turbo/libjpeg-turbo-1.4.2/jcdctmgr.c:716: error: undefined reference to 'jsimd_fdct_islow'
D:/eclipse/workspace/SohuJpeg/jni/vendor/libjpeg-turbo/libjpeg-turbo-1.4.2/jcdctmgr.c:716: error: undefined reference to 'jsimd_fdct_ifast'
D:/eclipse/workspace/SohuJpeg/jni/vendor/libjpeg-turbo/libjpeg-turbo-1.4.2/jcdctmgr.c:716: error: undefined reference to 'jsimd_fdct_float'
D:/eclipse/workspace/SohuJpeg/jni/vendor/libjpeg-turbo/libjpeg-turbo-1.4.2/jcdctmgr.c:716: error: undefined reference to 'jsimd_convsamp'
……

Do you have an example to generate a shared library by you github project ? My ndk-build version is r10e. And I can succeed to build static library without error.

Someone knows why ?

tingfengainiaini avatar Dec 24 '15 04:12 tingfengainiaini