我正在使用https://github.com/lilac/Android-ImageMagick为 Android 构建 ImageMagick 库。在尝试 ndk-build ImageMagick 时,我最终遇到了以下错误。
primary0:AndroidMagickActivity primary0$ ~/ndk/ndk-build
SharedLibrary : libandroid-magick.so
/Users/primary0/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/libcoders.a(jpeg.o): in function ReadJPEGImage:jni/../ndk-modules/ImageMagick-6.7.3-0/coders/jpeg.c:988: error: undefined reference to 'jpeg_std_error'
/Users/primary0/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/libcoders.a(jpeg.o): in function ReadJPEGImage:jni/../ndk-modules/ImageMagick-6.7.3-0/coders/jpeg.c:995: error: undefined reference to 'jpeg_destroy_decompress'
/Users/primary0/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/libcoders.a(jpeg.o): in function ReadJPEGImage:jni/../ndk-modules/ImageMagick-6.7.3-0/coders/jpeg.c:1004: error: undefined reference to 'jpeg_CreateDecompress'
/Users/primary0/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/libcoders.a(jpeg.o): in function ReadJPEGImage:jni/../ndk-modules/ImageMagick-6.7.3-0/coders/jpeg.c:1006: error: undefined reference to 'jpeg_set_marker_processor'
/Users/primary0/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/libcoders.a(jpeg.o): in function ReadJPEGImage:jni/../ndk-modules/ImageMagick-6.7.3-0/coders/jpeg.c:1007: error: undefined reference to 'jpeg_set_marker_processor'
/Users/primary0/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/libcoders.a(jpeg.o): in function ReadJPEGImage:jni/../ndk-modules/ImageMagick-6.7.3-0/coders/jpeg.c:1008: error: undefined reference to 'jpeg_set_marker_
.
.
.
collect2: ld returned 1 exit status
make: *** [obj/local/armeabi/libandroid-magick.so] Error 1
primary0:AndroidMagickActivity primary0$
包含定义错误中列出的常量的头文件 jpeg.c
#include "jpeglib.h"
你们中的任何人都知道为什么我会收到未定义的参考错误吗?