I am trying to install PyFTGL on MacOSX Yosemite.
The python version I am using is 2.7 from macports. I have installed boost from macports specifying +python27.
To install PyFTGL I built from source and edited the setup.py file from:
module_ftgl_libs = [
'GLU',
'GL',
'freetype',
'z',
'ftgl',
'boost_python',
]
module_ftgl = Extension(
'FTGL',
module_ftgl_src,
include_dirs=module_ftgl_include_dirs,
libraries=module_ftgl_libs
)
to:
module_ftgl_libs = [
'freetype',
'z',
'ftgl',
'boost_python',
]
module_ftgl = Extension(
'FTGL',
module_ftgl_src,
include_dirs=module_ftgl_include_dirs,
libraries=module_ftgl_libs,
extra_link_args=['-framework', 'OpenGL', '-framework', 'GLUT']
)
I then build the setup.py file and copy the resulting FTGL.so file to the same folder as my python code test.py which uses the FTGL functions.
My problem is when I now run my code I get the following error:
Traceback (most recent call last):
File "test.py", line 29, in <module>
import FTGL
ImportError: dlopen(/Users/james/Desktop/test/FTGL.so, 2): Symbol not found:__ZN5boost6python7objects15function_objectERKNS1_11py_functionERKNSt3__14pairIPNS0_6detail7keywordESA_EE
Referenced from: /Users/james/Desktop/test/FTGL.so
Expected in: flat namespace
in /Users/james/Desktop/test/FTGL.so
I don't know much about linking, setup.py files and boost and I have spent a long time researching on both Google and Stack Overflow but now I can't figure out the problem.