Upgrading to Qt 4.8.7 from Qt 4.8.5

Upgrading to Qt 4.8.7 on Windows

By Chongchen Saelee

I’m upgrading from Qt 4.8.5 to Qt 4.8.7. I’m also using QtCreator 2.8.0. This a step-by-step guide on how I successfully upgraded.

NOTE: Qt 4.8.7 requires newer minGW 64 compiler, so if you don’t install that correctly, it won’t work. Qt 4.8.7 SDK Installer does not come with minGW 64 compiler, so you have to download that separately.


Qt 4.8.7 SDK
qt-opensource-windows-x86-mingw482-4.8.7.exe (337MB)

minGW 64 + GCC 4.8.2 compiler
i686-4.8.2-release-posix-dwarf-rt_v3-rev3.7z (46MB)

QtCreator 2.8.0
qt-creator-windows-opensource-2.8.0.exe (52MB) Note: there is newer version 2.8.1 but I don’t need it, so I cannot guarantee ver 2.8.1 will work or is compatible myself

1. Install minGW 64 + GCC 4.8.2 compiler package. Note the folder is called “mingw32” compared to “mingw” for previous installation. Make sure you are not overwriting existing folders, or linking to wrong folder. You can check this by looking for existance of any dlls inside new mingw32 folder with “x64” anywhere in the filename. Note the folder location.

2. Install Qt 4.8.7 SDK. By default, it should install into it’s own directory, separate of previous version installations. When it prompts you for the required mingw folder, select the “mingw32” folder you just installed.

3. Now that the SDK is installed, you still have to add the kit to QtCreator 2.8.0 because it doesn’t automatically detect it. Go to Tools > Options.

4. In “Compilers” tab, click the “Add” button and type in the Name textbox “MinGW” or whatever you prefer. Then in the compiler path, browse to the “mingw32” folder and locate “g++.exe”. It’s usually in the bin folder. Note: make sure this is the correct location, otherwise it will not work later.

Qt 4.8.7 - Adding minGW to QtCreator 2.8.0
Qt 4.8.7 – Adding minGW to QtCreator 2.8.0

5. In “Qt Versions” tab, click Add and browse to the correct version of qmake.exe in your Qt 4.8.7 bin folder. Note: make sure this is correct location.

Qt 4.8.7 - Adding QMake to QtCreator 2.8.0
Qt 4.8.7 – Adding QMake to QtCreator 2.8.0

6. In “Kits” tab, click Add and name the kit “Qt 4.8.7 (minGW)” or whatever you prefer. Select the MinGW compiler you set up before. You can click Auto-detect on the debugger, otherwise you can locate it in the “mingw32” bin folder. Make sure this is correct location. Finally, select your Qt Version.

Qt 4.8.7 - Adding Qt 4.8.7 kit to QtCreator 2.8.0
Qt 4.8.7 – Adding Qt 4.8.7 kit to QtCreator 2.8.0

7. Click OK.

8. Now that your kit is added to QtCreator 2.8.0, you still need to make sure previous applications built with versions prior to Qt 4.8.7 are now compiled with the newest libraries. Open your pre-4.8.7 application and click on the “Projects” button on the left pane. You come to a Build Settings form. If you don’t see it, click on the “Build & Run” tab.

9. Under the “Build & Run” tab, click on the Add Kit button. Select the new Qt 4.8.7 kit you just setup. This adds a new tab titled “Qt 4.8.7 (minGW)” or whatever you named it earlier.

10. Now make sure your build directories are up to date. I just create a new folder with same syntax but change the version numbers so that there isn’t any confusion. Make sure you update this for the Build tab, and Run tab.

Qt 4.8.7 - Updating application built with previous versions of Qt (ie 4.8.5)
Qt 4.8.7 – Updating application built with previous versions of Qt (ie 4.8.5)

11. Lastly, to test if everything works out, click on the Build button on the bottom left pane to set which kit you want to build with. Select Debug or Release mode. Then click the green arrow Run button. If you set everything up correctly, then your application should run. Awesome!!!

Qt 4.8.7 - Test build and run
Qt 4.8.7 – Test build and run

12. When it’s time to deliver your application, do note there are some changes as compared to Qt 4.8.5.

Qt 4.8.7 minimum required DLLs for Windows GUI application:

vs Qt 4.8.5 minimum required DLLS:

and note any applications compiled with Qt 4.8.7 kit WILL NOT RUN WITH Qt 4.8.5 dlls. So if you want compatibility for both versions, you must compile two separate versions, which is why it was important to setup build directory separately.

Anyway, I hope that helps you out.


Leave a Reply

Your email address will not be published. Required fields are marked *