When I try it I get:
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/cscalelib.so, 2): Symbol not found: _glBindFramebufferEXT Referenced from: /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/cscalelib.so Expected in: dynamic lookup
I've tried all sort of things in the setup.py file. What do I actually need to put in it to link to OpenGL properly? My code compiles fine so there's no point putting that on there. Here is 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])
I didn't realise I had to remove the build directory. Now it imports correctly.
For anyone that needs to know you need: extra_link_args=['-framework', 'OpenGL']
Delete the build directory and try it again. It will work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With