Mupdf for android: ndk-build problem (error: overdefining typedef ....)

I follow the necessary steps to have MuPDF for Android. MuPDF is built on my system, I can use it with C ++, now I'm trying with Android. All steps in README were successfully completed, but when I got to step 10, that is, when I need to do ndk-build , I get some errors:

 /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 

What's wrong?

 $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: someone adds the mupdf tag

+2
android compilation pdf android-ndk jni
Sep 17 '11 at 9:07
source share
2 answers

jbig2dec/os_types.h redeclares uint32_t (and others),

You need to delete them manually.

Then it will work.

+2
Dec 07 '11 at 11:13
source share

I have a pager view in my application. Do I need to show pdf files on each fragment in the pager.is view there to get the pdf view from mupdf? usually we call mupdf below

Uri uri = Uri.parse ("path to the PDF file");

Intent intent = new Intent (context, MuPDFActivity.class);

intent.setAction (Intent.ACTION_VIEW);

intent.setData (URI);

context.startActivity (intentions);

So, if I use mupdf for my application, I have to call MuPDFActivity for each fragment. I think this is not the right way?

0
Oct 03 '14 at 7:16
source share



All Articles