当我尝试它时,我得到:
ImportError:dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/cscalelib.so,2):找不到符号:_glBindFramebufferEXT 引用自:/Library/Frameworks/Python.framework /Versions/2.5/lib/python2.5/site-packages/cscalelib.so 预期在:动态查找
我已经在 setup.py 文件中尝试了各种方法。我实际上需要放入什么才能正确链接到OpenGL?我的代码编译得很好,所以没有必要把它放在那里。这是 setup.py
from distutils.core import setup, Extension
module1 = Extension('cscalelib',
extra_compile_args = ["-framework OpenGL", "-lm", "-lGL", "-lGLU"],
sources = ['cscalelib.cpp'])
setup (name = 'cscalelib',
version = '0.1',
description = 'Test for setup_framebuffer',
ext_modules = [module1])