2

我有一个问题,现在已经有一段时间了。

系统设置是 OSX Lion 和Xcode 4.2.1,MacPorts 安装qt4-mac 4.7.4 +debugvtk5 5.6.1。我使用 cmake 作为构建系统。该项目包含一个带有 vtk 小部件的 Qt gui 应用程序。在调试模式下编译 gui 并运行它会引发很多行,例如

Class QCocoaColorPanelDelegate is implemented in both /opt/local/lib/libQtGui.4.dylib and /opt/local/lib/libQtGui_debug.4.dylib. One of the two will be used. Which one is undefined.

有几个 Cocoa 或 NS 相关的类。

otool -L 告诉我可执行文件链接到 qt 调试库。

有谁知道是什么原因造成的,我该如何解决?

4

2 回答 2

1

这对我有用:

sudo port deactivate qt4-mac-devel +debug
sudo port activate qt4-mac-devel @4.8.0_0+quartz
于 2012-03-31T21:50:07.093 回答
0

QCocoaColorPanelDelegate在两个库中都实现了,但只会加载和使用其中一个实现。您可能应该只链接到一个库或另一个(我假设您不想链接到调试库)。

于 2011-12-05T17:15:13.717 回答