{"id":218,"date":"2015-11-27T05:05:41","date_gmt":"2015-11-27T10:05:41","guid":{"rendered":"http:\/\/eastfist.com\/qt_tutorials\/?p=218"},"modified":"2018-04-12T03:42:54","modified_gmt":"2018-04-12T09:42:54","slug":"upgrading-to-qt-4-8-7-from-qt-4-8-5","status":"publish","type":"post","link":"https:\/\/eastfist.com\/qt_tutorials\/upgrading-to-qt-4-8-7-from-qt-4-8-5\/","title":{"rendered":"Upgrading to Qt 4.8.7 from Qt 4.8.5"},"content":{"rendered":"<p>Upgrading to Qt 4.8.7 on Windows<\/p>\n<p>By Chongchen Saelee<\/p>\n<p>I&#8217;m upgrading from Qt 4.8.5 to Qt 4.8.7. I&#8217;m also using QtCreator 2.8.0. This a step-by-step guide on how I successfully upgraded.<\/p>\n<p>NOTE: Qt 4.8.7 requires newer minGW 64 compiler, so if you don&#8217;t install that correctly, it won&#8217;t work. Qt 4.8.7 SDK Installer does not come with minGW 64 compiler, so you have to download that separately.<!--more--><\/p>\n<p>Requirements:<\/p>\n<p>Qt 4.8.7 SDK<br \/>\n<a href=\"https:\/\/download.qt.io\/official_releases\/qt\/4.8\/4.8.7\/qt-opensource-windows-x86-mingw482-4.8.7.exe\">qt-opensource-windows-x86-mingw482-4.8.7.exe<\/a> (337MB)<\/p>\n<p>minGW 64 + GCC 4.8.2 compiler<br \/>\n<a href=\"http:\/\/sourceforge.net\/projects\/mingw-w64\/files\/Toolchains%20targetting%20Win32\/Personal%20Builds\/mingw-builds\/4.8.2\/threads-posix\/dwarf\/i686-4.8.2-release-posix-dwarf-rt_v3-rev3.7z\/download\">i686-4.8.2-release-posix-dwarf-rt_v3-rev3.7z<\/a> (46MB)<\/p>\n<p>QtCreator 2.8.0<br \/>\n<a href=\"https:\/\/download.qt.io\/official_releases\/qtcreator\/2.8\/2.8.0\/qt-creator-windows-opensource-2.8.0.exe\">qt-creator-windows-opensource-2.8.0.exe<\/a> (52MB) Note: there is newer version 2.8.1 but I don&#8217;t need it, so I cannot guarantee ver 2.8.1 will work or is compatible myself<\/p>\n<p>1. Install minGW 64 + GCC 4.8.2 compiler package. Note the folder is called &#8220;mingw32&#8221; compared to &#8220;mingw&#8221; 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 &#8220;x64&#8221; anywhere in the filename. Note the folder location.<\/p>\n<p>2. Install Qt 4.8.7 SDK. By default, it should install into it&#8217;s own directory, separate of previous version installations. When it prompts you for the required mingw folder, select the &#8220;mingw32&#8221; folder you just installed.<\/p>\n<p>3. Now that the SDK is installed, you still have to add the kit to QtCreator 2.8.0 because it doesn&#8217;t automatically detect it. Go to Tools > Options.<\/p>\n<p>4. In &#8220;Compilers&#8221; tab, click the &#8220;Add&#8221; button and type in the Name textbox &#8220;MinGW&#8221; or whatever you prefer. Then in the compiler path, browse to the &#8220;mingw32&#8221; folder and locate &#8220;g++.exe&#8221;. It&#8217;s usually in the bin folder. Note: make sure this is the correct location, otherwise it will not work later.<\/p>\n<figure id=\"attachment_219\" aria-describedby=\"caption-attachment-219\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/eastfist.com\/qt_tutorials\/wp-content\/uploads\/2015\/11\/qt487_addMinGW.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/eastfist.com\/qt_tutorials\/wp-content\/uploads\/2015\/11\/qt487_addMinGW-300x174.png\" alt=\"Qt 4.8.7 - Adding minGW to QtCreator 2.8.0\" width=\"300\" height=\"174\" class=\"size-medium wp-image-219\" \/><\/a><figcaption id=\"caption-attachment-219\" class=\"wp-caption-text\">Qt 4.8.7 &#8211; Adding minGW to QtCreator 2.8.0<\/figcaption><\/figure>\n<p>5. In &#8220;Qt Versions&#8221; 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.<\/p>\n<figure id=\"attachment_221\" aria-describedby=\"caption-attachment-221\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/eastfist.com\/qt_tutorials\/wp-content\/uploads\/2015\/11\/qt487_addQmake.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/eastfist.com\/qt_tutorials\/wp-content\/uploads\/2015\/11\/qt487_addQmake-300x174.png\" alt=\"Qt 4.8.7 - Adding QMake to QtCreator 2.8.0\" width=\"300\" height=\"174\" class=\"size-medium wp-image-221\" \/><\/a><figcaption id=\"caption-attachment-221\" class=\"wp-caption-text\">Qt 4.8.7 &#8211; Adding QMake to QtCreator 2.8.0<\/figcaption><\/figure>\n<p>6. In &#8220;Kits&#8221; tab, click Add and name the kit &#8220;Qt 4.8.7 (minGW)&#8221; 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 &#8220;mingw32&#8221; bin folder. Make sure this is correct location. Finally, select your Qt Version.<\/p>\n<figure id=\"attachment_222\" aria-describedby=\"caption-attachment-222\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/eastfist.com\/qt_tutorials\/wp-content\/uploads\/2015\/11\/qt487_addQt487kit.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/eastfist.com\/qt_tutorials\/wp-content\/uploads\/2015\/11\/qt487_addQt487kit-300x174.png\" alt=\"Qt 4.8.7 - Adding Qt 4.8.7 kit to QtCreator 2.8.0\" width=\"300\" height=\"174\" class=\"size-medium wp-image-222\" \/><\/a><figcaption id=\"caption-attachment-222\" class=\"wp-caption-text\">Qt 4.8.7 &#8211; Adding Qt 4.8.7 kit to QtCreator 2.8.0<\/figcaption><\/figure>\n<p>7. Click OK.<\/p>\n<p>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 &#8220;Projects&#8221; button on the left pane. You come to a Build Settings form. If you don&#8217;t see it, click on the &#8220;Build &#038; Run&#8221; tab.<\/p>\n<p>9. Under the &#8220;Build &#038; Run&#8221; tab, click on the Add Kit button. Select the new Qt 4.8.7 kit you just setup. This adds a new tab titled &#8220;Qt 4.8.7 (minGW)&#8221; or whatever you named it earlier.<\/p>\n<p>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&#8217;t any confusion. Make sure you update this for the Build tab, and Run tab.<\/p>\n<figure id=\"attachment_223\" aria-describedby=\"caption-attachment-223\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/eastfist.com\/qt_tutorials\/wp-content\/uploads\/2015\/11\/qt487_projectBuildSettings.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/eastfist.com\/qt_tutorials\/wp-content\/uploads\/2015\/11\/qt487_projectBuildSettings-300x272.png\" alt=\"Qt 4.8.7 - Updating application built with previous versions of Qt (ie 4.8.5)\" width=\"300\" height=\"272\" class=\"size-medium wp-image-223\" \/><\/a><figcaption id=\"caption-attachment-223\" class=\"wp-caption-text\">Qt 4.8.7 &#8211; Updating application built with previous versions of Qt (ie 4.8.5)<\/figcaption><\/figure>\n<p>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!!!<\/p>\n<figure id=\"attachment_224\" aria-describedby=\"caption-attachment-224\" style=\"width: 235px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/eastfist.com\/qt_tutorials\/wp-content\/uploads\/2015\/11\/qt487_projectBuildSettings2.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/eastfist.com\/qt_tutorials\/wp-content\/uploads\/2015\/11\/qt487_projectBuildSettings2-235x300.png\" alt=\"Qt 4.8.7 - Test build and run\" width=\"235\" height=\"300\" class=\"size-medium wp-image-224\" \/><\/a><figcaption id=\"caption-attachment-224\" class=\"wp-caption-text\">Qt 4.8.7 &#8211; Test build and run<\/figcaption><\/figure>\n<p>12. When it&#8217;s time to deliver your application, do note there are some changes as compared to Qt 4.8.5.<\/p>\n<p>Qt 4.8.7 minimum required DLLs for Windows GUI application:<br \/>\nlibgcc_s_dw2-1.dll<br \/>\nlibstdc++-6.dll<br \/>\nlibwinpthread-1.dll<br \/>\nQtCore4.dll<br \/>\nQtGui4.dll<\/p>\n<p>vs Qt 4.8.5 minimum required DLLS:<br \/>\nmingwm10.dll<br \/>\nlibgcc_s_dw2-1.dll<br \/>\nQtCore4.dll<br \/>\nQtGui4.dll<\/p>\n<p>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.<\/p>\n<p>Anyway, I hope that helps you out.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Upgrading to Qt 4.8.7 on Windows By Chongchen Saelee I&#8217;m upgrading from Qt 4.8.5 to Qt 4.8.7. I&#8217;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&#8217;t install that correctly, it won&#8217;t work. Qt 4.8.7 SDK Installer does not &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/eastfist.com\/qt_tutorials\/upgrading-to-qt-4-8-7-from-qt-4-8-5\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Upgrading to Qt 4.8.7 from Qt 4.8.5&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[],"class_list":["post-218","post","type-post","status-publish","format-standard","hentry","category-qt-2"],"_links":{"self":[{"href":"https:\/\/eastfist.com\/qt_tutorials\/wp-json\/wp\/v2\/posts\/218","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eastfist.com\/qt_tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eastfist.com\/qt_tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eastfist.com\/qt_tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eastfist.com\/qt_tutorials\/wp-json\/wp\/v2\/comments?post=218"}],"version-history":[{"count":5,"href":"https:\/\/eastfist.com\/qt_tutorials\/wp-json\/wp\/v2\/posts\/218\/revisions"}],"predecessor-version":[{"id":228,"href":"https:\/\/eastfist.com\/qt_tutorials\/wp-json\/wp\/v2\/posts\/218\/revisions\/228"}],"wp:attachment":[{"href":"https:\/\/eastfist.com\/qt_tutorials\/wp-json\/wp\/v2\/media?parent=218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eastfist.com\/qt_tutorials\/wp-json\/wp\/v2\/categories?post=218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eastfist.com\/qt_tutorials\/wp-json\/wp\/v2\/tags?post=218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}