[英]How to build mupdf for android
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. 我尝试在Windows和ubuntu上使用ndk-build 64位进行编译时,在两台计算机上仍然出现相同的错误,我无法理解为什么存在此错误。
Followed this official steps 遵循此官方步骤
http://mupdf.com/docs/how-to-build-mupdf-for-android
http://mupdf.com/docs/how-to-build-mupdf-for-android
Changing the APP_PLATFORM fixed my problem. 更改APP_PLATFORM解决了我的问题。
I used the this tutorial to build mupdf for android 我使用了本教程来为Android构建mupdf
Make sure you have the following in platform/android/viewer/jni/Application.mk 确保在platform / android / viewer / jni / Application.mk中具有以下内容
For version before android 5.* APP_PLATFORM=android-9
对于android 5. *之前的版本*
APP_PLATFORM=android-9
For android version 5.* and after 对于Android版本5. *及更高版本
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 https://github.com/itzharDev/MuPDF
if you want to compile yourself, try to use Docker to compile source code 如果要自己编译,请尝试使用Docker编译源代码
i build linux docker image to compile MuPDF sources, i hope to release this image soon 我构建了Linux docker映像来编译MuPDF源码,我希望尽快发布该映像
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.