[QT macdeployqt]dyld: Symbol not found: __cg_jpeg_resync_to_restart解决方法


Qt项目在Mac下编译macdeployqt出现的问题如下:

dyld: Symbol not found: __cg_jpeg_resync_to_restart
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /usr/local/lib/libJPEG.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO

dyld: Symbol not found: __cg_TIFFClientOpen
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /usr/local/lib/libTIFF.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO

dyld: Symbol not found: __cg_png_create_info_struct
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /usr/local/lib/libPng.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO

解决方案链接:https://community.alfresco.com/thread/185711-symbol-not-found-cgjpegresynctorestart-leopard-1058

命令行如下

cd /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources

记得备份 $sudo

cp /usr/local/lib/libJPEG.dylib /usr/local/lib/libJPEG.dylib.bak
ln -s libJPEG.dylib /usr/local/lib/libJPEG.dylib
cp /usr/local/lib/libGIF.dylib /usr/local/lib/libGIF.dylib.bak
ln -s libJPEG.dylib /usr/local/lib/libGIF.dylib
cp /usr/local/lib/libTIFF.dylib /usr/local/lib/libTIFF.dylib.bak
ln -s libJPEG.dylib /usr/local/lib/libTIFF.dylib
cp /usr/local/lib/libPng.dylib /usr/local/lib/libPng.dylib.bak
ln -s libJPEG.dylib /usr/local/lib/libPng.dylib

参考:https://blog.csdn.net/huamin1990/article/details/88694791

你可能感兴趣的:([QT macdeployqt]dyld: Symbol not found: __cg_jpeg_resync_to_restart解决方法)