6

Android NDK 用に 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-r8b TOOLCHAIN=$(NDK)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin
  • java-bitmap/jniでmakeを実行しようとしました

次のエラーが表示されます。

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のスニペットです

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
4

1 に答える 1

-1

あと一歩になりました。

それ以外の

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): `__aeabi_unwind_cpp_pr0' への未定義の参照。

しかし、それはおそらくこの同じ問題が原因です

于 2013-10-16T23:47:50.240 に答える