我有最新的(git)版本的libqxt。我运行了./configure,它工作得很好,然后make失败了,并显示以下错误:
linking ../../lib/QxtWidgets.framework/QxtWidgets
ld: warning: directory not found for option '-L/usr/local/pgsql/lib'
ld: warning: directory not found for option '-L/tmp/qt-stuff-85167/source/qt-everywhere-opensource-src-4.8.1/Desktop/Qt/4.8.1/gcc/lib'
ld: warning: directory not found for option '-F/tmp/qt-stuff-85167/source/qt-everywhere-opensource-src-4.8.1/Desktop/Qt/4.8.1/gcc/lib'
Undefined symbols for architecture x86_64:
"_CGSGetWindowProperty", referenced from:
QxtWindowSystem::windowTitle(long) in qxtwindowsystem_mac.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [../../lib/QxtWidgets.framework/QxtWidgets] Error 1
make: *** [sub-src-widgets-install_subtargets] Error 2如果重要的话,我正在使用OSX Mountain Lion。
谢谢!
发布于 2012-08-10 18:44:27
Qxt似乎使用了一些在Mountain Lion中被删除的私有Mac OS X API。CGSGetWindowProperty在之前的Mac版本中没有文档,所以我猜使用它是不可靠的。
发布于 2013-01-18 04:53:51
作为一个老生常谈的修复,你可以删除CGSGetWindowProperty属性调用- Qxt将被编译,但当然QxtWindowSystem::windowTitle将不能正常工作。
diff --git a/src/widgets/mac/qxtwindowsystem_mac.cpp b/src/widgets/mac/qxtwindowsystem_mac.cpp
index 63cab38..de4a89c 100644
--- a/src/widgets/mac/qxtwindowsystem_mac.cpp
+++ b/src/widgets/mac/qxtwindowsystem_mac.cpp
@@ -89,11 +89,7 @@ QString QxtWindowSystem::windowTitle(WId window)
// most of CoreGraphics private definitions ask for CGSValue as key but since
// converting strings to/from CGSValue was dropped in 10.5, I use CFString, which
// apparently also works.
- err = CGSGetWindowProperty(connection, window, (CGSValue)CFSTR("kCGSWindowTitle"), &windowTitle);
- if (err != noErr) return QString();
-
- // this is UTF8 encoded
- return QCFString::toQString((CFStringRef)windowTitle);
+ return QString();
}
QRect QxtWindowSystem::windowGeometry(WId window)为了便于将来参考,您可以监控this issue in libqxt repository。
https://stackoverflow.com/questions/11892171
复制相似问题