作者bizkit (腻)
看板MacDev
标题Re: [问题] 在 Leopard 上使用 PyOpenGL
时间Thu Oct 2 16:38:02 2008
※ 引述《bizkit (腻)》之铭言:
: Hi,
: 请问有没有人成功在 leopard 上安装 了 PyOpenGL ?
: 我可以用 glut 在 C/C++ 上写 GL
: 安装 PyOpenGL 的过程也没有错误讯息
: 但是 from OpenGL.GL import * 就会失败
: bt:
: File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ \
: python2.5/ctypes/__init__.py", line 325, in __init__
: self._handle = _dlopen(self._name, mode)
: OSError: ('dlopen(glut, 10): image not found', 'glut', None)
: 请问我做错了什麽?
自问自答...
在 /Library/Python/2.5/site-packages/PyOpenGL-3.0.0b6-py2.5.egg/
OpenGL/platform/darwin.py
42 # glut shouldn't need to be global, but just in case a dependent library makes
43 # the same assumption GLUT does...
44 GLUT = ctypesloader.loadLibrary(
45 ctypes.cdll,
46 'glut',
47 mode=ctypes.RTLD_GLOBAL
48 )
改成
42 # glut shouldn't need to be global, but just in case a dependent library makes
43 # the same assumption GLUT does...
44 GLUT = ctypesloader.loadLibrary(
45 ctypes.cdll,
46 'GLUT',
47 mode=ctypes.RTLD_GLOBAL
48 )
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.138.16.55