gpt4 book ai didi

android - 为 Android NDK 构建 Pango Cairo

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:46:54 25 4
gpt4 key购买 nike

我发现有人为 Android NDK(blog postsource code)移植了 Pango Cairo。但是我没有成功编译他的示例项目。有没有人设法这样做并且可以告诉我我做错了什么?

这是我目前尝试过的:

  • git clone --recursive http://dev.laptop.org/git/users/cscott/android-libs/
  • git 出于某种原因找不到 pixman,git clone http://cgit.freedesktop.org/pixman/ 也是如此。 ,并移动到 android-libs/jni/pixman
  • android-libs/jni/ 的内容复制到 android-libs/examples/java-bitmap/jni(不确定要保留哪个 Android.mk?)
  • java-bitmap/jni/Makefile.devel 重命名为 Makefile
  • 编辑 java-bitmap/jni/Makefile 如下:NDK=/cygdrive/f/android-ndk-r8bTOOLCHAIN=$(NDK)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin
  • 尝试在 java-bitmap/jni 中运行 ma​​ke

我收到以下错误:

checking for arm-linux-eabi-gcc... arm-linux-androideabi-gcc --sysroot /cygdrive/f/android-ndk-r8b/platforms/android-9/arch-arm -fpic -ffunction-sections -funwind-tables -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__  -mfpu=vfp -Wno-psabi -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -DANDROID -Wa,--noexecstack -g -isystem /cygdrive/f/workspace/java-bitmap/jni/sysroot/include
checking whether the C compiler works... no
configure: error: in `/cygdrive/f/workspace/java-bitmap/jni/pixman':
configure: error: C compiler cannot create executables
See `config.log' for more details
Makefile:133: recipe for target `pixman/config.h' failed
make: *** [pixman/config.h] Error 77

这是 config.h 的一个 fragment

configure:3460: checking whether the C compiler works
configure:3482: arm-linux-androideabi-gcc --sysroot /cygdrive/f/android-ndk-r8b/platforms/android-9/arch-arm -fpic -ffunction-sections -funwind-tables -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -mfpu=vfp -Wno-psabi -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -DANDROID -Wa,--noexecstack -g -isystem /cygdrive/f/workspace/java-bitmap/jni/sysroot/include -nostdlib -DPIXMAN_NO_TLS -DWCHAR_MIN=INT_MIN -DWCHAR_MAX=INT_MAX -I/cygdrive/f/workspace/java-bitmap/jni/pixman-extra -I/cygdrive/f/workspace/java-bitmap/jni/sysroot/include -include pixman-elf-fix.h -Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,-z,noexecstack -lc -lgcc -L/cygdrive/f/workspace/java-bitmap/jni/sysroot/lib conftest.c >&5
cc1.exe: error: pixman-elf-fix.h: No such file or directory
configure:3486: $? = 1
configure:3524: result: no
configure: failed program was:

..

configure:3529: error: in `/cygdrive/f/workspace/java-bitmap/jni/pixman':
configure:3531: error: C compiler cannot create executables
See `config.log' for more details

最佳答案

我更进了一步。

代替

git clone http://cgit.freedesktop.org/pixman/

我下载了

git clone --recursive http://dev.laptop.org/git/users/cscott/android-pixman

并将所有文件复制到空的 jni/pixman 目录中。现在找到文件 pixman-elf-fix.h,但链接器失败:

/tmp/cc2XOCMj.o:(.ARM.exidx.text.main+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'.

但这可能是由 this same problem 引起的

关于android - 为 Android NDK 构建 Pango Cairo,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11762320/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com