我需要在片段中显示PDF文档,经过一些在线研究后,我遇到了最受欢迎的MuPDF阅读器和开源阅读器,我按照此链接http://mupdf.blogspot.in/中的所有步骤进行了操作。当我尝试使用以下命令通过Cyqwin编译此MuPDF库时,按照上述博客
**Open Cygwin console,(just double click cygwin installation short-cut) and type following command and enter.
cd /cygdrive/<path to mupdf sorce folder/android ex. cd /cygdrive/c/mupdf-1.0- source/android
/cygdrive/<path to ndk installation>/ndk-build ex. /cygdrive/c/ndk/ndk-build**
我收到以下错误
**Compile thumb : mupdfcore <= draw_path.c
Compile thumb : mupdfcore <= draw_simple_scale.c
C:\cygwin64\tmp\ccEtywkX.s: Assembler messages:
C:\cygwin64\tmp\ccEtywkX.s:2248: Error: lo register required -- `str fp,[sp,#-4]!'
C:\cygwin64\tmp\ccEtywkX.s:2253: Error: lo register required -- `add fp,sp,#0'
C:\cygwin64\tmp\ccEtywkX.s:2257: Error: lo register required -- `str r0,[fp,#-16]'
C:\cygwin64\tmp\ccEtywkX.s:2258: Error: lo register required -- `str r1,[fp,#-20]'
C:\cygwin64\tmp\ccEtywkX.s:2259: Error: lo register required -- `str r2,[fp,#-24]'
C:\cygwin64\tmp\ccEtywkX.s:2260: Error: lo register required -- `str r3,[fp,#-28]'
C:\cygwin64\tmp\ccEtywkX.s:2262: Error: lo register required -- `ldr r3,[fp,#-24]'
C:\cygwin64\tmp\ccEtywkX.s:2263: Error: lo register required -- `str r3,[fp,#-8]'
C:\cygwin64\tmp\ccEtywkX.s:2267: Error: lo register required -- `ldr r3,[fp,#-16]'
C:\cygwin64\tmp\ccEtywkX.s:2269: Error: lo register required -- `str r2,[fp,#-16]'
C:\cygwin64\tmp\ccEtywkX.s:2270: Error: lo register required -- `ldr r2,[fp,#-20]'
C:\cygwin64\tmp\ccEtywkX.s:2272: Error: lo register required -- `str r1,[fp,#-20]'
C:\cygwin64\tmp\ccEtywkX.s:2276: Error: lo register required -- `ldr r3,[fp,#-8]'
C:\cygwin64\tmp\ccEtywkX.s:2278: Error: lo register required -- `str r3,[fp,#-8]'
C:\cygwin64\tmp\ccEtywkX.s:2281: Error: lo register required -- `ldr r3,[fp,#-8]'
C:\cygwin64\tmp\ccEtywkX.s:2285: Error: lo register required -- `ldr r3,[fp,#-28]'
C:\cygwin64\tmp\ccEtywkX.s:2286: Error: lo register required -- `ldr r2,[fp,#4]'
C:\cygwin64\tmp\ccEtywkX.s:2289: Error: lo register required -- `ldr r2,[fp,#-24]'
C:\cygwin64\tmp\ccEtywkX.s:2291: Error: lo register required -- `str r3,[fp,#-8]'
...
at the end this long operation terminates with the following ...
C:\cygwin64\tmp\ccEtywkX.s:4057: Error: lo register required -- `ldr r3,[fp,#-104]'
C:\cygwin64\tmp\ccEtywkX.s:4061: Error: lo register required -- `sub sp,fp,#8'
C:\cygwin64\tmp\ccEtywkX.s:4063: Error: lo register required -- `ldmfd sp!,{r4,fp,pc}'
/cygdrive/d/Sajay/Software/android-ndk-r9/build/core/build-binary.mk:345: recipe for target 'obj/local/armeabi/objs-debug/mupdfcore/__/__/draw/draw_simple_scale.o' failed
make: *** [obj/local/armeabi/objs-debug/mupdfcore/__/__/draw/draw_simple_scale.o] Error 1**
在线尝试此问题后,我遇到了以下stackoverflow问题,这与我的问题非常相似
http://stackoverflow.com/questions/15050042/error-while-building-mupdf-1-1-on-mac
我下载了NDK 8b并尝试编译,但我仍然以较短的形式收到类似的错误
Compile : mupdf <= mupdf.c
/bin/sh: /cygdrive/d/user/Software/android-ndk-r8b-windows/android-ndk-r8b/toolchains/arm-linux-androideabi-4.8/prebuilt/windows/bin/arm-linux-androideabi-gcc: No such file or directory
/cygdrive/d/user/Software/android-ndk-r8b-windows/android-ndk-r8b/build/core/build-binary.mk:252: recipe for target 'obj/local/armeabi/objs-debug/mupdf/mupdf.o' failed
make: *** [obj/local/armeabi/objs-debug/mupdf/mupdf.o] Error 127
任何帮助都会受到很多赞赏。
提前致谢。
答案 0 :(得分:0)
我刚刚解决了这样的问题!我用gcc在我的项目中编译了一个xxx.S文件,它就像这样抛出错误
“../ src / __ sys.S:20:错误:需要注册 - 'stmdb r0!,{r4-r11}'”
和这个
“../ src / __ sys.S:20:错误:Thumb-2指令仅在统一语法中有效 - ”stmdb r0!,{r4}'“
我从这个wiki中找到了一个解决方案 https://wiki.ubuntu.com/ARM/Thumb2PortingHowto#Types_of_Assembly_Language
通过在我的xxx.S文件的开头添加此行来解决我的问题
.syntax unified
希望这对你有用!