Mac安装zimg路之杀怪

1、Mac OS X 下命令行编译错误: ld: library not found for -lgcc_s.10.14.4(10.14.4需要变通1)
解决:MACOSX_DEPLOYMENT_TARGET=10.14(10.14.4需要变通1) make

2、could not find openssl (missing openssl_include_dir)
解决:export OPENSSL_ROOT_DIR=/usr/local/Cellar/openssl/1.0.2o_2/ (路径需要变通2)
export OPENSSL_INCLUDE_DIR=/usr/local/Cellar/openssl/1.0.2o_2/include/

3、could not find imagemagick (missing imagemagick_magickcord_library)
解决:/Users/duqiong/zimg/src/CMakeLists.txt (路径需要变通3)
find_package (ImageMagick COMPONENTS MagickCore REQUIRED) find_package (ImageMagick COMPONENTS MagickWand REQUIRED)
修改成如下
set (ImageMagick_INCLUDE_DIRS "/usr/local/Cellar/imagemagick@6/6.9.10-43/include/ImageMagick-6") set (ImageMagick_MagickCore_LIBRARY "/usr/local/Cellar/imagemagick@6/6.9.10-43/lib/libMagickCore-6.Q16.dylib") set (ImageMagick_MagickWand_LIBRARY "/usr/local/Cellar/imagemagick@6/6.9.10-43/lib/libMagickWand-6.Q16.dylib")
4、如果安装imagemagick7.x最终还是无法成功安zimg,
解决:请brew install imagemagick@6

你可能感兴趣的:(mac)