android的Mupdf: ndk-build问题(错误:重新定义了typedef..)



我遵循必要的步骤有MuPDF的Android。MuPDF是建立在我的系统上的,我可以用c++开发它,现在尝试用Android。README中的所有步骤都成功遵循,但当我到达步骤10时,也就是当我必须执行ndk-build时,我得到一些错误:

/home/pc/sviluppo/android-ndk-r6b/platforms/android-8/arch-arm/usr/include/stdint.h:53: error: redefinition of typedef 'uint32_t'
/home/pc/sviluppo/mupdf-0.9/android/jni/../../thirdparty/jbig2dec/os_types.h:46: note: previous declaration of 'uint32_t' was here
make: *** [/home/pc/sviluppo/mupdf-0.9/android/obj/local/armeabi/objs-  debug/mupdfthirdparty/../../thirdparty/jbig2dec/jbig2.o] Errore 1

怎么了?

$PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/pc/sviluppo/android-sdk-linux_x86/tools:/home/pc/sviluppo/android-ndk-r6b

PS:有人添加了mupdf标签

jbig2dec/os_types.h重新声明uint32_t(和其他),

您需要手动删除它们。

我在我的应用程序中有视图分页。我需要显示PDF文件上的每个片段在查看页。有办法从mupdf获得PDF视图吗?通常我们调用mupdf如下

Uri Uri = Uri。解析("路径到PDF文件");

Intent = new Intent(context, mupdfacactivity .class);

intent.setAction (Intent.ACTION_VIEW);

intent.setData (uri);

context.startActivity(意图);

所以如果我使用mupdf为我的应用程序,我必须在每个片段上调用MuPDFActivity。我认为这不是一个正确的方式?

最新更新