неділя, 21 лютого 2010 р.

Building 4.6.2 QT library from sources.

This article is not tutorial. It is just my personal experience, that might be useful for other C++ developers as well. There is plenty of information about this subject on web. The good place to start is an official QT site:http://qt.nokia.com/doc/4.6/install-win.html
http://qt.nokia.com/doc/4.6/install-x11.html
http://doc.trolltech.com/4.5/qt-embedded-install.html

Note that compiled version of library available, but for some reason compiled package was available only for VS2008 (at least at time I wrote this article). I use VS2005 and VS2003 for my development.

Unzip qt archive
Run Visual Studio command line, cd to unpacked library directory, run

configure.exe -static -platform win32-msvc2005

When configuration process completed, run nmake.
First advice: Download zip archive and do not trust any Windows ports of tar utility if you are going to extract archives created on other platforms. Downloading of tar.gz archive was the natural choice for me (can be used on Windows and Linux). It caused the first problem. I run configure with success and then proceed to nmake. To my disappointment every time I run nmake I got (approximately 2 hours per iteration!) very strange error with description I never saw before. I hope I will never see it again :).
Second advice: Check that you have enough free space on your hard drive before compilation. My development laptop HDD had 4GB of free space and it was not enough. If you got strange linker error with message “Can’t …” - actually means "No free space left on HDD".

Exist tricks that help to reduce free space consumption. Run nmake tasks:

nmake sub-src
nmake sub-tools
nmake sub-plugins
nmake sub-sql

Use -no-webkit configuration flag if you do not need HTML rendering engine. Compilation of WebKit takes significant time and HDD free space.

Немає коментарів:

Дописати коментар

Прихильники