Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImageMagick SDK error: "Undefined symbols for architecture armv7"

I am using the ImageMagick SDK in my old one app. But it shows me an error in 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

What changes should I do?

All recommended compiler flags have been set properly...

like image 449
Saggy Avatar asked Mar 19 '23 01:03

Saggy


1 Answers

Looks like you are missing libz. The problem can be fixed by adding linking to the compression library in "Other Link Flag": -lz

like image 179
us_david Avatar answered Apr 26 '23 04:04

us_david