gpt4 book ai didi

android - 编译 imagemagick for android

转载 作者:太空宇宙 更新时间:2023-11-03 10:28:49 27 4
gpt4 key购买 nike

我正在尝试编译这个项目 https://github.com/lilac/Android-ImageMagick .要生成 android-magick.so,我需要在我的系统上编译它。我修改了rebuild脚本,变成如下错误。

Clean: MagickCore [armeabi]
Clean: android-magick [armeabi]
Clean: coders [armeabi]
Clean: filters [armeabi]
Clean: jpeg [armeabi]
Clean: stdc++ [armeabi]
Clean: tiff-shared [armeabi]
Clean: tiff-static [armeabi]
Clean: tiffinfo [armeabi]
Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
Gdbsetup : libs/armeabi/gdb.setup
Compile thumb : android-magick <= jmagick.c
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c:7:24: error: magick/api.h: No such file or directory
In file included from /home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c:8:
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.h:4:26: error: magick/image.h: No such file or directory
In file included from /home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c:8:
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.h:26: error: expected ';', ',' or ')' before '*' token
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.h:131: error: expected declaration specifiers or '...' before 'RectangleInfo'
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.h:151: error: expected declaration specifiers or '...' before 'PixelPacket'
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.h:165: error: expected declaration specifiers or '...' before 'Image'
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.h:198: error: expected declaration specifiers or '...' before 'ProfileInfo'
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.h:212: error: expected declaration specifiers or '...' before 'ProfileInfo'
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c:38: error: expected ';', ',' or ')' before '*' token
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c: In function 'getHandle':
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c:150: warning: cast to pointer from integer of different size
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c: In function 'setHandle':
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c:204: warning: cast from pointer to integer of different size
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c: At top level:
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c:586: error: expected declaration specifiers or '...' before 'RectangleInfo'
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c: In function 'getRectangle':
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c:595: error: 'iRect' undeclared (first use in this function)
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c:595: error: (Each undeclared identifier is reported only once
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c:595: error: for each function it appears in.)
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c: At top level:
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c:622: error: expected declaration specifiers or '...' before 'PixelPacket'
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c: In function 'getPixelPacket':
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c:637: error: 'iPixelPacket' undeclared (first use in this function)
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c:637: error: 'Quantum' undeclared (first use in this function)
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c:637: error: expected ';' before 'red'
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c:638: error: expected ';' before 'green'
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c:639: error: expected ';' before 'blue'
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c:640: error: expected ';' before 'opacity'
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c: At top level:
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c:662: error: expected declaration specifiers or '...' before 'Image'
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c: In function 'newImageObject':
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c:684: error: 'image' undeclared (first use in this function)
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c: At top level:
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c:733: error: expected declaration specifiers or '...' before 'ProfileInfo'
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c: In function 'setProfileInfo':
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c:746: error: 'profileInfo' undeclared (first use in this function)
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c: At top level:
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c:768: error: expected declaration specifiers or '...' before 'ProfileInfo'
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c: In function 'getProfileInfo':
/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/jni/jmagick.c:795: error: 'profileInfo' undeclared (first use in this function)
make: *** [/home/vita/projects/lilac-Android-ImageMagick-5f1c8b5/obj/local/armeabi/objs-debug/android-magick/jmagick.o] Fehler 1

有人可以给我一些提示吗?

最佳答案

您必须手动将包含行中的所有路径更改为绝对路径。我遇到了同样的问题并以这种方式解决了它。

因此,例如在 jmagick.c 中,您将有一行内容是
include <magick/api.h>include "magick/api.h"
您必须将其更改为 api.h 文件所在的绝对路径。我的位于 C:/SomeFolders/Android-ImageMagick-master/Android-ImageMagick-master/ndk-modules/ImageMagick-6.7.3-0/magick 所以我将包含指令更改为
include <C:/SomeFolders/Android-ImageMagick-master/Android-ImageMagick-master/ndk-modules/ImageMagick-6.7.3-0/magick/api.h>
而且你必须在所有给你这个“没有这样的文件或目录”错误的文件中执行此操作

不过,在我完成这些操作后,它会要求提供 ft2build.h 头文件,而实际上我的磁盘上没有这个文件。所以我不知道该怎么办:(

关于android - 编译 imagemagick for android,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8899294/

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