我已经使用我自己的Qt4库编译了Python模块,位于~/opt/qt-4.6.0/
, ,但是当我尝试导入该模块时,加载的动态库来自我的MacPorts Qt4安装。错误的Mac OS X框架被加载
$ /opt/local/bin/python2.6
>>> import vtk
objc[58041]: Class QMacSoundDelegate is implemented in both /Users/luis/opt/qt-4.6.0/lib/QtGui.framework/Versions/4/QtGui and /opt/local/libexec/qt4-mac/lib/QtGui.framework/Versions/4/QtGui. Using implementation from /opt/local/libexec/qt4-mac/lib/QtGui.framework/Versions/4/QtGui.
objc[58045]: Class QCocoaColorPanelDelegate is implemented in both /Users/luis/opt/qt-4.6.0/lib/QtGui.framework/Versions/4/QtGui and /opt/local/libexec/qt4-mac/lib/QtGui.framework/Versions/4/QtGui. Using implementation from /opt/local/libexec/qt4-mac/lib/QtGui.framework/Versions/4/QtGui.
[... more output like above ...]
>>>
有没有告诉Python的(也是从MacPorts的安装)加载位于我~/opt/qt-4.6.0/lib/
目录框架的一种方式?我不确定要更改哪些环境变量。
我以前试过LD_LIBRARY_PATH,但没有奏效。不过,非常感谢指向'dyld'的指针。其手册页非常丰富。让我们看看我能否用它来解决这个问题。 – Luis 2009-09-04 21:12:09
您是否尝试过DYLD_LIBRARY_PATH? – 2009-09-04 22:06:30
...刚看到你的答案。很高兴你想出来了。 – 2009-09-04 22:07:49