Qt应用程序抛出"dyld:找不到符号:__ cg_jpeg_resync_to_restart". [英] Qt application throws "dyld: Symbol not found: __cg_jpeg_resync_to_restart"

查看:749
本文介绍了Qt应用程序抛出"dyld:找不到符号:__ cg_jpeg_resync_to_restart".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在OS X上遇到了众所周知的dyld问题.

I get well known dyld issue on OS X.

Qt.pro文件:

INCLUDEPATH += /usr/local/Cellar/libpng/1.6.23/include /usr/local/Cellar/jpeg/8d/include
LIBS += -L/usr/local/Cellar/libpng/1.6.23/lib -L/usr/local/Cellar/jpeg/8d/lib -ljpeg -lpng -ljpeg -lz

在运行时,我的应用程序抛出:

In runtime my application throws:

dyld:找不到符号:__cg_jpeg_resync_to_restart引用自: /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 预期位于:/usr/local/Cellar/jpeg/8d/lib/libjpeg.8.dylib中 /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib

dyld: Symbol not found: __cg_jpeg_resync_to_restart Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib Expected in: /usr/local/Cellar/jpeg/8d/lib/libjpeg.8.dylib in /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib

我以前已经知道了这一点,并使用了 answer 对其进行了修复,但是现在又发生了,该建议不起作用.我该如何解决这个问题?

I already got this before and I fixed it using this answer, but now it occurs again and this advice not works. How can I solve this problem?

推荐答案

这只是QtCreator运行时问题. DanyAlejandro的答案(上述)部分正确.

This is only a QtCreator runtime issue. DanyAlejandro's answer (above) is partially correct.

  1. 转到项目->运行->运行环境"(显示详细信息)
  2. 我不建议您取消设置,而应该编辑 两者: DYLD_LIBRARY_PATH DYLD_FRAMEWORK_PATH
  3. /System/Library/Frameworks/ImageIO.framework/Resources:添加到两个路径的开头(用冒号分隔的字符串)
  4. 再次构建项目-这将永久修复该问题
  1. Go to Projects -> Run -> "Run Environment" (show Details)
  2. I would not recommend Unset, rather you should edit Both: DYLD_LIBRARY_PATH and DYLD_FRAMEWORK_PATH
  3. Add /System/Library/Frameworks/ImageIO.framework/Resources: to the beginning for both paths (colon delimited string)
  4. Build project again - this will fix it for good

这篇关于Qt应用程序抛出"dyld:找不到符号:__ cg_jpeg_resync_to_restart".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆