找不到dyld符号,但是nm报告其他错误(OS X更新问题) [英] dyld symbol not found, but nm reports otherwise (OS X Update issue)

查看:90
本文介绍了找不到dyld符号,但是nm报告其他错误(OS X更新问题)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理一个OpenGL项目,它可以正常编译,运行它会出现以下错误:

I'm working on an OpenGL project, it compiles fine, running it gives the following error:

swr-130-64-133-128:assignment Marcella$ ./run
dyld: lazy symbol binding failed: Symbol not found: _gliCreateContextWithShared
  Referenced from: /System/Library/Frameworks/OpenGL.framework/Resources/GLEngine.bundle/GLEngine
  Expected in: flat namespace

dyld: Symbol not found: _gliCreateContextWithShared
  Referenced from: /System/Library/Frameworks/OpenGL.framework/Resources/GLEngine.bundle/GLEngine
  Expected in: flat namespace

我已经收集到这意味着OpenGL框架中缺少一个符号.但是,nm另有声明:

I've gathered that this means there's a missing symbol in the OpenGL framework. However, nm claims otherwise:

0000000000001239 T _gliCreateContextWithShared

​​ Asher 有一个类似的问题,但我不知道如何将他的解决方案应用于我的处境.

Asher had a similar-looking problem, but I couldn't figure out how to apply his solution to my situation.

值得注意的是:我最近升级到OS X 10.9.2,现在所有依赖此库的项目都失败,并出现相同的错误.

Worth noting: I upgraded to OS X 10.9.2 recently, and all my projects depending on this library now fail with the same error.

推荐答案

通过添加解决此问题

export DYLD_INSERT_LIBRARIES='/System/Library/Frameworks/OpenGL.framework/Resources/GLEngine.bundle/GLEngine' 

到我的.bash_profile.也许这不是最优雅的解决方案,但生活就是如此.

to my .bash_profile. Probably not the most elegant solution but such is life.

这篇关于找不到dyld符号,但是nm报告其他错误(OS X更新问题)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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