jni/../../../../thirdparty/openjpeg/src/lib/openjp2/j2k.c:5977: error: undefined reference to 'opj_has_thread_support'
jni/../../../../thirdparty/openjpeg/src/lib/openjp2/j2k.c:5980: error: undefined reference to 'opj_get_num_cpus'
jni/../../../../thirdparty/openjpeg/src/lib/openjp2/j2k.c:5957: error: undefined reference to 'opj_has_thread_support'
jni/../../../../thirdparty/openjpeg/src/lib/openjp2/j2k.c:5959: error: undefined reference to 'opj_thread_pool_destroy'
jni/../../../../thirdparty/openjpeg/src/lib/openjp2/j2k.c:5962: error: undefined reference to 'opj_thread_pool_create'
jni/../../../../thirdparty/openjpeg/src/lib/openjp2/j2k.c:5966: error: undefined reference to 'opj_thread_pool_create'
jni/../../../../thirdparty/openjpeg/src/lib/openjp2/j2k.c:7618: error: undefined reference to 'opj_thread_pool_destroy'
jni/../../../../thirdparty/openjpeg/src/lib/openjp2/j2k.c:6021: error: undefined reference to 'opj_thread_pool_create'
jni/../../../../thirdparty/openjpeg/src/lib/openjp2/j2k.c:6024: error: undefined reference to 'opj_thread_pool_create'
jni/../../../../thirdparty/openjpeg/src/lib/openjp2/tcd.c:1606: error: undefined reference to 'opj_thread_pool_wait_completion'
jni/../../../../thirdparty/openjpeg/src/lib/openjp2/dwt.c:647: error: undefined reference to 'opj_thread_pool_get_thread_count'
jni/../../../../thirdparty/openjpeg/src/lib/openjp2/dwt.c:706: error: undefined reference to 'opj_thread_pool_wait_completion'
jni/../../../../thirdparty/openjpeg/src/lib/openjp2/dwt.c:724: error: undefined reference to 'opj_thread_pool_wait_completion'
jni/../../../../thirdparty/openjpeg/src/lib/openjp2/dwt.c:729: error: undefined reference to 'opj_thread_pool_submit_job'
jni/../../../../thirdparty/openjpeg/src/lib/openjp2/dwt.c:731: error: undefined reference to 'opj_thread_pool_wait_completion'
jni/../../../../thirdparty/openjpeg/src/lib/openjp2/dwt.c:793: error: undefined reference to 'opj_thread_pool_submit_job'
jni/../../../../thirdparty/openjpeg/src/lib/openjp2/t1.c:1656: error: undefined reference to 'opj_tls_get'
jni/../../../../thirdparty/openjpeg/src/lib/openjp2/t1.c:1660: error: undefined reference to 'opj_tls_set'
jni/../../../../thirdparty/openjpeg/src/lib/openjp2/t1.c:1772: error: undefined reference to 'opj_thread_pool_submit_job'
collect2: error: ld returned 1 exit status
I tried on both windows and ubuntu still got same error on both machine when compiling using ndk-build 64 bit, I am not able to understand why this error existing.
Followed this official steps
Changing the APP_PLATFORM fixed my problem.
I used the this tutorial to build mupdf for android
Make sure you have the following in platform/android/viewer/jni/Application.mk
For version before android 5.* APP_PLATFORM=android-9
For android version 5.* and after
APP_PLATFORM=android-16
APP_ABI := armeabi-v7a
CFLAGS += -fvisibility=default -fPIE
LDFLAGS += -rdynamic -fPIE -pie
This will fix your problem
UPDATE
you can use my compiled lib:
https://github.com/itzharDev/MuPDF
if you want to compile yourself, try to use Docker to compile source code
i build linux docker image to compile MuPDF sources, i hope to release this image soon
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.