-1

i'm new in using NDK8 and i want to build MUPDF library for my PDF Viewer project, i followed MuPdf Reader integrate in project and also this ReadMe.txt and i encountered this errors:.

Terminal Ouput

Compile thumb  : mupdfthirdparty <= sfnt.c
Compile thumb  : mupdfthirdparty <= truetype.c
Compile thumb  : mupdfthirdparty <= type1.c
StaticLibrary  : libmupdfthirdparty.a
SharedLibrary  : libmupdf.so
./obj/local/armeabi/libmupdfcore.a(pdf_xref.o): In function `pdf_init_document':
/Users/durgaprasad/guna/mupdf/android/jni/../../pdf/pdf_xref.c:784: undefined     reference  to `pdf_new_js'
 /Users/durgaprasad/guna/mupdf/android/jni/../../pdf/pdf_xref.c:785: undefined reference to `pdf_js_load_document_level'
  ./obj/local/armeabi/libmupdfcore.a(pdf_xref.o): In function `pdf_close_document':
   /Users/durgaprasad/guna/mupdf/android/jni/../../pdf/pdf_xref.c:815: undefined reference to `pdf_drop_js'
 ./obj/local/armeabi/libmupdfcore.a(pdf_xref.o): In function `pdf_new_document':
/Users/durgaprasad/guna/mupdf/android/jni/../../pdf/pdf_xref.c:1298: undefined    reference     to `pdf_write_document'
./obj/local/armeabi/libmupdfcore.a(pdf_annot.o): In function `pdf_load_annots':
/Users/durgaprasad/guna/mupdf/android/jni/../../pdf/pdf_annot.c:371: undefined reference to `pdf_update_appearance'
/Users/durgaprasad/guna/mupdf/android/jni/../../pdf/pdf_annot.c:403: undefined reference to `pdf_field_type'
collect2: ld returned 1 exit status
make: *** [obj/local/armeabi/libmupdf.so] Error 1
  • 1
    Refer this ... http://stackoverflow.com/questions/12159759/error-in-integration-of-mupdf-library/12279638#12279638 – Thushara Sep 06 '12 at 11:49

3 Answers3

1

Depending on when you took a copy of the source, it is possible that you have a copy which will not build on Android. It was noticed yesterday (6th September) that the addition of a new set of features had broken the Android build. Naturally this was promptly fixed.

I would suggest that you pull a new set of source from the official Git repository and try again.

Kurt Pfeifle
  • 86,724
  • 23
  • 248
  • 345
KenS
  • 30,202
  • 3
  • 34
  • 51
0

Looks like you're missing some of the source files, or a library. The one where pdf_new_js, pdf_js_load_document_level and other missing symbols are defined.

Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
0

The steps in the read me

11) //removed some part

On windows (where you are using cygwin), or on linux/macos, this can be as simple as running 'make' in the top level directory. Even if the make process fails, it should get far enough to generate you the required 'generated' directory, and you can continue through these instructions.

12) Change into the android directory, and edit local.properties into your favourite editor. Change the sdk path there as appropriate. This should be the only bit of localisation you need to do.

13) Change into the android directory (note, the android directory, NOT the android/jni directory!), and execute (in a Cygwin window on Windows!):

   ndk-build

14) Then execute:

   ant debug

You are probably running ndk-build make sure you are in the right folder mupdf_source/android

and you have performed step 11 which you have to run in mupdf_source folder , from logs I think some problem is with step 11 .

Trying running it again and after that run ndk-build

Update:

I am using r7 on Ubuntu , I was able compile it just by following the instructions ,

  • make sure the environment is set . Cross check by building a sample application which has native code , Example : http://marakana.com/forums/android/examples/49.html
  • make sure android/local.properties.sample has been edited and renamed to android/local.properties
Sunny Kumar Aditya
  • 2,806
  • 4
  • 26
  • 38
  • Hi, Thanks for your reply. Step 11 has no problem. On Step 12, I edited the local.properties and everything is fine. My problem is with ndk-build only. – Durga Prasad Sep 06 '12 at 10:15