Xcode 上的 CImg 和 libtiff 的链接器错误
Linker errors with CImg and libtiff on Xcode
我无法让 libtiff 成功链接到使用 CImg 的应用程序。
我已经用brew安装了libtiff,什么都没有,从源代码编译libtiff并且仍然没有安装任何东西(顺便说一句,编译后的libtiff.a在哪里?我已经在 XCode 中添加了路径,但仍然无法链接它。在其他链接器标志中:/usr/local/lib/libtiff.a,但仍然没有。我得到很多:
"_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)
好的,
我已经解决了。我不得不再次执行所有过程:下载libtiff,使用CMake为我的系统生成适当的配置文件(unix makefiles),然后从那里,只需控制台制作和安装,它们已正确安装在我的系统中,因此Xcode最终可以看到它们。我猜CMake是这里的英雄,因为./Configure以前没用。
相关文章:
- 静态数据成员的问题-修复链接错误会导致编译器错误
- Visual Studio mkl_link_tool.exe链接错误
- C++ 实现模板单例类时出现链接错误
- 使用类模板的方法链接错误
- MySQL C++连接器链接错误
- VS 2015 链接错误 无法构建依赖于 libcurl 的项目
- 运行 C++ 单元测试时LNK2005链接错误
- 对 CMake 中'cudaRegisterLinkedBinary'链接错误的未定义引用?
- 链接错误,包括我创建的相同头文件 - C++
- 在Embarcadero C++ Builder中生成的DLL未解决的外部链接错误
- 使用标头保护的多个定义链接错误
- 链接错误:未定义对 stdscr 和 wgetch 的引用
- 使用 Vivek 的 Vcam / 捕获源过滤器构建/链接错误
- 升压program_options中的链接错误
- 使用 g++ 预处理器进行替换会导致链接错误
- 在调试配置中编译工作正常,但发布会给出链接错误
- 相邻矩阵设置链接错误
- 包含常量变量并包含在多个文件中的标头的链接错误
- C++链接错误,我理解但无法解决
- 是什么导致macOS Mojave上的GoogleTest链接错误