[英]compiling libqxt in mac osx
我有最新的(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。
謝謝!
好像Qxt正在使用Mountain Lion中刪除的一些私有Mac OS X API。 在以前的Mac OS X版本中沒有記錄CGSGetWindowProperty,所以我認為無論如何使用它都是不可靠的。
作為一個hacky修復你可以刪除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)
為了將來參考,您可以在libqxt存儲庫中監視此問題 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.