简体   繁体   English

未找到dyld符号,但nm报告否则(OS X更新问题)

[英]dyld symbol not found, but nm reports otherwise (OS X Update issue)

I'm working on an OpenGL project, it compiles fine, running it gives the following error: 我正在开发一个OpenGL项目,它编译得很好,运行它会产生以下错误:

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

I've gathered that this means there's a missing symbol in the OpenGL framework. 我认为这意味着OpenGL框架中缺少一个符号。 However, nm claims otherwise: 但是, nm另有说法:

0000000000001239 T _gliCreateContextWithShared

Asher had a similar-looking problem, but I couldn't figure out how to apply his solution to my situation. Asher有一个类似的问题,但我无法弄清楚如何将他的解决方案应用于我的情况。

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. 值得注意的是:我最近升级到了OS X 10.9.2,而且依赖于这个库的所有项目现在都失败并出现同样的错误。

Fixed it by adding 通过添加修复它

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

to my .bash_profile. 到我的.bash_profile。 Probably not the most elegant solution but such is life. 可能不是最优雅的解决方案,但这就是生活。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM