MacOSX + Boost_Python + PyFTGL: - Symbol nicht gefunden, erwartet in: flachem Namespace
Ich versuche PyFTGL unter MacOSX Yosemite zu installieren.
Die von mir verwendete Python-Version ist 2.7 von Macports. Ich habe Boost von Macports mit Angabe von + python27 installiert.
Um PyFTGL zu installieren, habe ich aus dem Quellcode erstellt und die Datei setup.py bearbeitet von:
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
)
zu
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']
)
Ich erstelle dann die Datei setup.py und kopiere die resultierende Datei FTGL.so in denselben Ordner wie mein Python-Code test.py, der die FTGL-Funktionen verwendet.
Mein Problem ist, wenn ich jetzt meinen Code ausführe, erhalte ich die folgende Fehlermeldung:
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
Ich weiß nicht viel über Links, setup.py-Dateien und Boost und habe lange nach Google und Stack Overflow gesucht, aber jetzt kann ich das Problem nicht herausfinden.