How to build 64bit Qt for windows

From Qt Wiki
Revision as of 15:41, 14 January 2015 by Maintenance script (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Qt Build for 64 bit Environment on Windows with Microsoft Visual Studio

Building 64bit Qt is pretty straightforward if you have built 32bit Qt. There is no need to make change in qmake and mkspec. It has been confirmed to work up to Qt 4.7.4 at the time of this writing.

If you have built Qt before…

With Microsoft Visual Studio installed, run your build using its 64bit command prompt and follow the same steps you would for a 32bit build. Note that if you use Microsoft Visual Studio 2010, you must have its Service Pack 1 installed to avoid major build issues.

There are two easy ways to open the 64bit command prompt in 2010:

  • Start->All Programs->Microsoft Visual Studio 2010->Visual Studio Tools->Visual Studio x64 Win64 Command Prompt (2010)
  • Launch it from the Tools menu within Visual Studio

If you have not built Qt before…

Never fear! If I can do it, you can, too. Follow the step-by-step instructions at this link:
http://www.holoborodko.com/pavel/2011/02/01/how-to-compile-qt-4-7-with-visual-studio-2010/

A couple warnings

Keep in mind that Qt x64 is not completely supported by Nokia yet, so some bugs still exist.

You can develop with your new 64bit version of Qt using a clean installation of 32bit Qt Creator (confirmed using QtCreator v2.3.1, Qt 4.7.4×64). If you want to debug your software with Qt Creator, make sure you install the Debugging Tools for Windows as instructed here [doc.qt.nokia.com]. Stable 64bit versions of MinGW are still hard to find, so you will have to use the Visual Studio compiler.