Recompile Qt 4.5 Open Source

Here are the steps  to rebuild Qt on Windows:

1. I installed the SDK in C:\Qt\2009.01 (that’s why I am using this path bellow).

2. I downloaded the tool Junction from Microsoft’s site : http://technet.microsoft.com/en-us/sysin…s/bb896768.aspx
I put “junction.exe” in C:\Qt\2009.01\qt.

3. I went to Start > Qt SDK by Nokia v2009.01 (open source) > Qt Command Prompt.

4. I typed the following commands :

mkdir C:\qt-greenhouse\Trolltech\Code_less_create_more\Trolltech\Code_less_create_more\Troll\

junction C:\qt-greenhouse\Trolltech\Code_less_create_more\Trolltech\Code_less_create_more\Troll\4.5.0 C:\Qt\2009.01

configure -release -static -fast -accessibility -no-qt3support -no-stl -no-phonon -no-scripttools -no-openssl -no-opengl

mingw32-make

5. I opened my project in Qt Creator and from the menu, I chose Build > Set Build Configuration > Release. Now I could run the project !

6. If you need to reconfigure and rebuild Qt from the same location,    ensure that all traces of the previous configuration are removed by entering the build directory and typing
nmake confclean
before running the configure script again.

Basically, the Junction tool creates a symbolic link between C:\qt-greenhouse\Trolltech\Code_less_create_more\Trolltech\Code_less_create_more\Troll\4.5.0 (which is the path required by configure due to a bug !) and your Qt directory.

Advertisements

4 responses to “Recompile Qt 4.5 Open Source

  1. Works perfect! Thanks a lot.

    It seems Qt didn’t integrate OpenSSL into the SDK (at least it wasn’t included in my LGPL download), so you have to run configure.exe with -openssl to use QSsl stuff.

  2. Many thanks for pointing out this bug.

    Admin rights are required to create the directory c:\qt-greenhouse … . I look for a solution to install Qt as regular user. Any ideas?

  3. I think I don’t have any solution for your problem Al_.. Except you have time to wait patch from Qt..

  4. What worked for me: install with admin rights on another machine (but same directory path as on the machine where I am not admin), then copied everything over.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s