-1

I can't get libtiff to successfully link for an application that uses CImg.

I've installed libtiff with brew, nothing, compiled libtiff from sources and installed still nothing (where's the libtiff.a after compilation btw?) I've added the path in XCode but still cannot get it linked. In other linker flags: /usr/local/lib/libtiff.a but still nothing. I get a lot of:

 "_jpeg_read_header", referenced from:
      _TIFFjpeg_read_header in libtiff.a(tif_jpeg.o)
      _jpeg_read_header_encap in libtiff.a(tif_ojpeg.o)
  "_jpeg_has_multiple_scans", referenced from:
      _TIFFjpeg_has_multiple_scans in libtiff.a(tif_jpeg.o)
  "_jpeg_std_error", referenced from:
      _TIFFjpeg_create_decompress in libtiff.a(tif_jpeg.o)
      _TIFFjpeg_create_compress in libtiff.a(tif_jpeg.o)
      _OJPEGPreDecode in libtiff.a(tif_ojpeg.o)
  "_deflateParams", referenced from:
      _PixarLogVSetField in libtiff.a(tif_pixarlog.o)
      _ZIPVSetField in libtiff.a(tif_zip.o)
  "_jpeg_start_compress", referenced from:
      _TIFFjpeg_start_compress in libtiff.a(tif_jpeg.o)
  "_jpeg_CreateDecompress", referenced from:
      _TIFFjpeg_create_decompress in libtiff.a(tif_jpeg.o)
      _jpeg_create_decompress_encap in libtiff.a(tif_ojpeg.o)
  "_deflateEnd", referenced from:
      _PixarLogCleanup in libtiff.a(tif_pixarlog.o)
      _ZIPSetupDecode in libtiff.a(tif_zip.o)
      _ZIPCleanup in libtiff.a(tif_zip.o)
  "_jpeg_abort", referenced from:
      _TIFFjpeg_error_exit in libtiff.a(tif_jpeg.o)
      _TIFFjpeg_abort in libtiff.a(tif_jpeg.o)
      _TIFFjpeg_progress_monitor in libtiff.a(tif_jpeg.o)
  "_jpeg_resync_to_restart", referenced from:
      _TIFFJPEGIsFullStripRequired in libtiff.a(tif_jpeg.o)
      _JPEGSetupDecode in libtiff.a(tif_jpeg.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Cœur
  • 37,241
  • 25
  • 195
  • 267

1 Answers1

0

Ok I've solved it. I had to do all of the processes again: download libtiff, use CMake to generate the appropriate configuration files for my system, (unix makefiles) and from there, just a console make and make install and they were correctly installed in my system so Xcode finally could see them. I guess CMake was the hero here because the ./Configure was useless before.