2012-08-09 8 views
5

私はlibqxtの最新(git)バージョンを持っています。mac osxでlibqxtをコンパイルする

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マウンテンライオンを使用しています:私は./configureを実行し、それがうまく動作しますが、このエラーで失敗します。

ありがとうございます!

答えて

4

Qxtのようなものは、Mountain Lionで削除されたプライベートMac OS X APIを使用しています。 CGSGetWindowPropertyはMac OS Xの以前のバージョンでは文書化されていなかったので、とにかくそれを使用することは信頼できませんでした。

+1

ええ、これも私が考えていたことです...これを回避する方法があると思いますか、ヘッダー/ライブラリを別の場所で見つける方法がありますか?もしそうなら、どこ? – sfw

4

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を参照してください。

+0

可能であれば、この質問にお答えできますか?http://stackoverflow.com/questions/28708747/error-trying-to-install-qxt-for-sending-email?あなたが言った修正をしました、 'make install'の段階でエラーが出ました。 – SexyBeast

関連する問題