You are not logged in.

Dear visitor, welcome to If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.


Friday, March 21st 2008, 10:56am

Installing Qt 4.3.4 GPL on WXP (Problem&Solution)

My problem was that I had downloaded the Qt source code instead of the executable file and tried to connect it to Dev-C++'s mingw32 manually.
Here is how I finally installed and test-ran Qt 4.3.4 on WinXP SP 2 (the following is a compilation of instructions and hints from how-to web pages and forum threads; it might prevent a newbie like myself form wasting time.) Note: as always, read plenty of stuff and be sure you know what you're doing before you try new things on your computer. I.e., follow this recipe at your own risk! :P

1) Download the exe. file from Trolltech. Install it in C:\Qt\4.3.4.
2) Say YES when the installer asks you whether or not to install MinGW. (For some reason, there was someting missing from Dev-C++'s mingw32 on my computer, so I couldn't use that.) Install it in C:\MinGW.
3) Right-click on My Computer, then Properties->Advanced. Click on Environment variables.
4) In System variables, scroll down to Path, double-click and append it with this:
Be sure not to forget the first semicolon - if you look at the value of the Path variable as it is when you first open it, you'll see many paths separated by semicolons.
5) In the same window, click on New under System variables. Type QTDIR in the variable name field and C:\Qt\4.3.4 in the variable value field. Click OK. This creates a new environment variable called QTDIR whose value is C:\Qt\4.3.4.
6) Click on New again and create another variable, QMAKESPEC, with the value win32-g++.
7) Restart your computer. (This isn't in anything I read, but on my computer the new paths and variables didn't take effect until I rebooted. This might be how it's supposed to be, I don't know.)
8) To make sure you have the new (appended) Path and the new variables, open the command prompt and enter "path". You should see the appended paths at the end. On a new line type "echo %qtdir%" and you should get the value of QTDIR (i.e. C:\Qt\4.3.4). On a new line type "echo %qmakespec%" and you should see the value of QMAKESPEC (i.e. win32-g++). Don't mess with the Path variable - it's vital to your computer's system.
9) To test your installation, try to compile a program from the command line using qmake and then make. (Instructions in the Qt Assistant->qmake tutorial.) The qmake command creates something called a makefile (I'm not sure what that is yet), and the make command creates the exe file of your program. If you don't get things like "qmake is not recognized..." and you find new files in your project folder, you're golden!

Good luck!

This post has been edited 5 times, last edit by "minami" (Mar 23rd 2008, 12:18pm)