2012-04-02 67 views
4

我是使用NDK的新手,我想爲我的PDF Viewer項目構建MUPDF庫,我跟着 Integrate MuPDF Reader in an app也是這個ReadMe.txt,我遇到了這個錯誤:building MUPDF for Android

[email protected]:/$ ndk-build -C /home/home/Downloads/MUPDFlib/mupdf-0.9/android 
make: Entering directory `/home/home/Downloads/MUPDFlib/mupdf-0.9/android' 
Gdbserver  : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver 
Gdbsetup  : libs/armeabi/gdb.setup 
Gdbserver  : [arm-linux-androideabi-4.4.3] libs/armeabi-v7a/gdbserver 
Gdbsetup  : libs/armeabi-v7a/gdb.setup 
Compile thumb : mupdf <= mupdf.c 
Compile thumb : mupdfcore <= base_error.c 
Compile thumb : mupdfcore <= base_geometry.c 
Compile thumb : mupdfcore <= base_getopt.c 
Compile thumb : mupdfcore <= base_hash.c 
Compile thumb : mupdfcore <= base_memory.c 
Compile thumb : mupdfcore <= base_object.c 
Compile thumb : mupdfcore <= base_string.c 
Compile thumb : mupdfcore <= base_time.c 
Compile thumb : mupdfcore <= crypt_aes.c 
Compile thumb : mupdfcore <= crypt_arc4.c 
Compile thumb : mupdfcore <= crypt_md5.c 
Compile thumb : mupdfcore <= crypt_sha2.c 
Compile thumb : mupdfcore <= dev_bbox.c 
Compile thumb : mupdfcore <= dev_list.c 
Compile thumb : mupdfcore <= dev_null.c 
Compile thumb : mupdfcore <= dev_text.c 
jni/../../fitz/dev_text.c:6:22: error: ft2build.h: No such file or directory 
jni/../../fitz/dev_text.c:7:10: error: #include expects "FILENAME" or <FILENAME> 
jni/../../fitz/dev_text.c:8:10: error: #include expects "FILENAME" or <FILENAME> 
jni/../../fitz/dev_text.c: In function 'fz_text_extract_span': 
jni/../../fitz/dev_text.c:215: error: 'FT_Face' undeclared (first use in this function) 
jni/../../fitz/dev_text.c:215: error: (Each undeclared identifier is reported only once 
jni/../../fitz/dev_text.c:215: error: for each function it appears in.) 
jni/../../fitz/dev_text.c:215: error: expected ';' before 'face' 
jni/../../fitz/dev_text.c:237: error: 'face' undeclared (first use in this function) 
jni/../../fitz/dev_text.c:318: error: 'FT_Fixed' undeclared (first use in this function) 
jni/../../fitz/dev_text.c:318: error: expected ';' before 'ftadv' 
jni/../../fitz/dev_text.c:319: error: 'FT_LOAD_NO_BITMAP' undeclared (first use in this function) 
jni/../../fitz/dev_text.c:319: error: 'FT_LOAD_NO_HINTING' undeclared (first use in this function) 
jni/../../fitz/dev_text.c:319: error: 'FT_LOAD_IGNORE_TRANSFORM' undeclared (first use in this function) 
jni/../../fitz/dev_text.c:324: error: 'ftadv' undeclared (first use in this function) 
make: *** [obj/local/armeabi/objs-debug/mupdfcore/__/__/fitz/dev_text.o] Error 1 
make: Leaving directory `/home/home/Downloads/MUPDFlib/mupdf-0.9/android' 
[email protected]:/$ 

希望有人能幫助我這裏。

+0

你可以看看這裏:http://stackoverflow.com/questions/8500530/mupdf-reader-integrate-in-project/8587527#8587527。我已經提出瞭如何構建mupdf的分步說明。 – Yury 2012-06-20 08:41:18

回答

2

android文件夾中運行ndk-build之前,在mupdf-0.9文件夾中運行命令make

0

here

  • 首先,在您的電腦上安裝Android NDK
  • 然後下載mupdf 0.8.15源代碼(不要在1.0.0下載1.0版,沒有mupdf源代碼)
  • 下載的第三方zip包 (mupdf-thirdparty-2011-02-24.zip),網址:mupdf.com//download/archive,

喲你會成功編譯。

+1

[請提供摘要](http://meta.stackexchange.com/q/115837/158556)以獲取非英文網頁的鏈接。 – Matthias 2012-05-25 09:46:41

+0

我可以簡單地將此頁面翻譯成英文。首先,將android NDK安裝到您的計算機中。然後下載mupdf 0.8.15源代碼(不要下載1.0版本,沒有1.0.0中的mupdf源代碼),並下載第三方zip包(mupdf-thirdparty-2011-02-24.zip),網址:http://mupdf.com//download/archive/,然後編譯就這麼簡單。 – 2012-05-25 16:01:42

+0

@MorrsionMacleo而不是通過評論更新你的答案,你可以直接更新你的答案。我冒昧地爲您演示了編輯和佈局功能。如果你對它不滿意,你可以進一步回滾或編輯它 – 2012-05-25 16:37:11