我已經使用我自己的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