调试与发布:将使用两者之一。哪一个是未定义的
我有一个问题,已经有一段时间了。
系统设置为 OSX Lion 和 Xcode 4.2.1,MacPorts 安装了 qt4-mac 4.7.4 +debug 和 vtk5 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 调试库。
有谁知道导致此问题的原因以及我如何解决它?
I have a problem, quite some time now.
The system settings are OSX Lion with Xcode 4.2.1, MacPorts installed qt4-mac 4.7.4 +debug and and vtk5 5.6.1. I use cmake as build system. The project contains a Qt gui application with a vtk widget. Compiling the gui in debug mode and running it throws a lot of lines like
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.
with several Cocoa or NS related classes.
otool -L tells me the executable is linked against the qt debug libraries.
Has anyone an idea what causes this and how I could resolve it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这对我有用:
This worked for me:
QCocoaColorPanelDelegate
在两个库中都实现了,但只会加载和使用其中一个实现。您可能应该只链接到一个库或另一个库(我假设您不想链接到调试库)。QCocoaColorPanelDelegate
is implemented in both libraries, but only one of the implementations will be loaded and used. You should probably just link to one library or the other (I'd assume you don't want to link to the debug library).