blog 文章

2009年1月1日 星期四

compile qt4 on cygwin

http://wiki.lyx.org/LyX/LyXOnCygwin#toc1

跟著做, 並把需要的 cygwin 套件先安裝起來,
遇到 uic 在執行時的問題, uic 會 hang 住, 產生不出 .ui 對應的 .cpp file。
我把 qt-x11 4.3.3 在 linux 重新 compile, 得到該 .ui 對應的 .cpp file,
在 copy 到 cygwin 的 qt-x11 4.3.3 下。

rcc 也有類似 uic 的問題, 用同樣的方法解決。

qwininputcontext_win.cpp 找不到
bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event)
我加了宣告在 qwininputcontext_win.cpp。

請使用 cygwin gcc 3.4.4, 我使用 gcc-4.3.2 的版本才會發生以上問題。
使用 cygwin gcc 3.4.4 後, 就可以參照該文章 compile qt-4.3.3。

我使用了以下的 configuration:

../configure -prefix /usr/local/qt/4.3.3 -platform cygwin-g++-win32 -v -release -static -fast -no-qt3support -no-3dnow -no-sse2 -no-exceptions -no-largefile -no-rpath -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-cups -no-pch -no-opengl -no-glib -qt-zlib -no-qdbu

make
make install

編譯出來的 qt-4.3.3 沒有 big5 textcodec support.

include/QtGui/QtGui
include/QtCore/QtCore
這兩個檔案我是從 qt win 的版本 copy 過去。

also ref:
http://blog.gwright.org.uk/articles/2008/01/21/qt-windows-and-cygwin

沒有留言:

張貼留言

使用 google 的 reCAPTCHA 驗證碼, 總算可以輕鬆留言了。

我實在受不了 spam 了, 又不想讓大家的眼睛花掉, 只好放棄匿名留言。這是沒辦法中的辦法了。留言的朋友需要有 google 帳號。