我在旧的应用程序中使用ImageMagick SDK。但它在XCode 6中显示错误。
Undefined symbols for architecture armv7:
"_deflateInit2_", referenced from:
_png_write_IHDR in libpng.a(libpng12_la-pngwutil.o)
"_deflateParams", referenced from:
_PixarLogVSetField in libtiff.a(tif_pixarlog.o)
_ZIPVSetField in libtiff.a(tif_zip.o)
"_deflateReset", referenced from:
_PixarLogPreEncode in libtiff.a(tif_pixarlog.o)
_ZIPPreEncode in libtiff.a(tif_zip.o)
_png_write_compressed_data_out in libpng.a(libpng12_la-pngwutil.o)
_png_write_finish_row in libpng.a(libpng12_la-pngwutil.o)
"_inflateReset", referenced from:
_PixarLogPreDecode in libtiff.a(tif_pixarlog.o)
_ZIPPreDecode in libtiff.a(tif_zip.o)
_png_decompress_chunk in libpng.a(libpng12_la-pngrutil.o)
_png_read_finish_row in libpng.a(libpng12_la-pngrutil.o)
"_deflateInit_", referenced from:
_ZLIBEncodeImage in libMagickCore.a(magick_libMagickCore_la-compress.o)
_WriteMIFFImage in libMagickCore.a(magick_libMagickCore_la-miff.o)
_PixarLogSetupEncode in libtiff.a(tif_pixarlog.o)
_ZIPSetupEncode in libtiff.a(tif_zip.o)
"_gzgetc", referenced from:
_ReadBlob in libMagickCore.a(magick_libMagickCore_la-blob.o)
"_deflateEnd", referenced from:
_ZLIBEncodeImage in libMagickCore.a(magick_libMagickCore_la-compress.o)
_WriteMIFFImage in libMagickCore.a(magick_libMagickCore_la-miff.o)
_png_write_destroy in libpng.a(libpng12_la-pngwrite.o)
_PixarLogCleanup in libtiff.a(tif_pixarlog.o)
_ZIPSetupDecode in libtiff.a(tif_zip.o)
_ZIPCleanup in libtiff.a(tif_zip.o)
"_gztell", referenced from:
_TellBlob in libMagickCore.a(magick_libMagickCore_la-blob.o)
"_gzputc", referenced from:
_WriteBlob in libMagickCore.a(magick_libMagickCore_la-blob.o)
"_gzseek", referenced from:
_SeekBlob in libMagickCore.a(magick_libMagickCore_la-blob.o)
"_crc32", referenced from:
_ReadOneJNGImage in libMagickCore.a(magick_libMagickCore_la-png.o)
_png_write_chunk_from_profile in libMagickCore.a(magick_libMagickCore_la-png.o)
_WriteOnePNGImage in libMagickCore.a(magick_libMagickCore_la-png.o)
_WriteOneJNGImage in libMagickCore.a(magick_libMagickCore_la-png.o)
_WriteMNGImage in libMagickCore.a(magick_libMagickCore_la-png.o)
_png_reset_crc in libpng.a(libpng12_la-png.o)
_png_calculate_crc in libpng.a(libpng12_la-png.o)
...
"_gzerror", referenced from:
_CloseBlob in libMagickCore.a(magick_libMagickCore_la-blob.o)
"_inflateSync", referenced from:
_PixarLogDecode in libtiff.a(tif_pixarlog.o)
_ZIPDecode in libtiff.a(tif_zip.o)
"_zlibVersion", referenced from:
_RegisterPNGImage in libMagickCore.a(magick_libMagickCore_la-png.o)
"_gzclose", referenced from:
_CloseBlob in libMagickCore.a(magick_libMagickCore_la-blob.o)
"_inflateInit_", referenced from:
_ReadMATImage in libMagickCore.a(magick_libMagickCore_la-mat.o)
_ReadMIFFImage in libMagickCore.a(magick_libMagickCore_la-miff.o)
_png_create_read_struct_2 in libpng.a(libpng12_la-pngread.o)
_PixarLogSetupDecode in libtiff.a(tif_pixarlog.o)
_ZIPSetupDecode in libtiff.a(tif_zip.o)
"_gzread", referenced from:
_ReadBlob in libMagickCore.a(magick_libMagickCore_la-blob.o)
"_inflate", referenced from:
_ReadMATImage in libMagickCore.a(magick_libMagickCore_la-mat.o)
_ReadMIFFImage in libMagickCore.a(magick_libMagickCore_la-miff.o)
_png_read_row in libpng.a(libpng12_la-pngread.o)
_PixarLogDecode in libtiff.a(tif_pixarlog.o)
_ZIPDecode in libtiff.a(tif_zip.o)
_png_decompress_chunk in libpng.a(libpng12_la-pngrutil.o)
_png_read_finish_row in libpng.a(libpng12_la-pngrutil.o)
...
"_gzwrite", referenced from:
_WriteBlob in libMagickCore.a(magick_libMagickCore_la-blob.o)
"_inflateEnd", referenced from:
_ReadMIFFImage in libMagickCore.a(magick_libMagickCore_la-miff.o)
_png_read_destroy in libpng.a(libpng12_la-pngread.o)
_PixarLogCleanup in libtiff.a(tif_pixarlog.o)
_ZIPSetupEncode in libtiff.a(tif_zip.o)
_ZIPCleanup in libtiff.a(tif_zip.o)
"_deflate", referenced from:
_ZLIBEncodeImage in libMagickCore.a(magick_libMagickCore_la-compress.o)
_WriteMIFFImage in libMagickCore.a(magick_libMagickCore_la-miff.o)
_png_write_flush in libpng.a(libpng12_la-pngwrite.o)
_PixarLogEncode in libtiff.a(tif_pixarlog.o)
_PixarLogPostEncode in libtiff.a(tif_pixarlog.o)
_ZIPEncode in libtiff.a(tif_zip.o)
_ZIPPostEncode in libtiff.a(tif_zip.o)
...
"_gzopen", referenced from:
_OpenBlob in libMagickCore.a(magick_libMagickCore_la-blob.o)
"_gzflush", referenced from:
_SyncBlob in libMagickCore.a(magick_libMagickCore_la-blob.o)
ld: symbol(s) not found for architecture armv7
我应该做些什么改变?
所有推荐的编译器标志都已正确设置......
答案 0 :(得分:6)
看起来你错过了libz。可以通过在“其他链接标志”中添加链接到压缩库来解决此问题:-lz
答案 1 :(得分:0)