dyld Missing glX* from libX11

2019-09-07 08:06发布

问题:

​While attempting to run [executable], a program I wrote under Linux and am attempting to test under XQuartz on OSX, I get:

dyld: lazy symbol binding failed: Symbol not found: _glXChooseVisual
  Referenced from: [executable]
  Expected in: /usr/X11/lib/libX11.6.dylib
[...]
Trace/BPT trap: 5

The only precedent I could find was this, which wasn't resolved. My program uses GLEW as set up here. Clearly, glXChooseVisual isn't being found, but I would expect it in libX11, so . . . what went wrong?

回答1:

glXChooseVisual is located in libGL not in libX11