I’ve written an article about how to build PySide2 earlier. Some partners were asking about how to build QT 5.6.1 This is a guide for building QT 5.6.1 on windows.
Prerequisite:
- Visual Studio 2012 Update 4 or Update 5
- QT 5.6.1
- Ruby 2.1.7(32 bits)
- Perl for OpenSSL
- JOM (recommended)
Build Steps:
1. Download and unzip the tarball from the Autodesk open source distribution page
Depending on how you extracted the tar file, you may need to remove the ending digits (ie. 000644) in the extracted filename. I am using 7zip and it doesn’t have this issue. Copy it into your qt folder for later usage.
2. Download the Qt distribution labeled ICU53_1
There are several files available, the one we need is icu_53_1_msvc_2012_64_devel.7z. After downloading, extract it and copy the icu53_1 folder to your QT directory (eg. C:QT).
3. Download OpenSSL(1.0.1l) and build
You can download it from OpenSSL’s website. Extract it into the QT directory, you’ll need to build it yourself before using it to build QT. Follow the instruction in the INSTALL.W64.
4. Update the Build Environment
Open and edit BuildQt561-VS2012.cmd and update the path. Notice that for Python, we’d recommend to use a 64 bit Python build with Visual Studio 2012 to avoid any runtime issues. But Official 64 bit Python 2.7 should also be fine to build QT.
5. Configure
There are several configurations in our document (howToBuildQtOnWindows_m2017.txt), I’ve built both debug and release version of QT. Please execute BuildQt561-VS2012.cmd in a command shell before doing following steps.
cd c:qt
mkdir qt-build-561
cd qt-build-561
..qt-adsk-5.6.1configure -prefix C:qtqt-adsk-5.6.1.out -debug-and-release -force-debug-info -opensource -icu -opengl desktop -directwrite -openssl -plugin-sql-sqlite -I c:qtopenssl1.0.1l-vc11-nossl3include -L c:qtopenssl1.0.1l-vc11-nossl3 -no-warnings-are-errors -nomake examples -nomake tests
I copied my OpenSSL build into c:qtopenssl1.0.1l-vc11-nossl3. The OpenSSL include folder path should point to inc32 folder inside your OpenSSL source package. I made some changes to the path according to the document, you don’t have to do it yourself.
The prefix for parameter is for the final step. You need to specify a directory for the final output package.
For more details about the parameters, please refer to the “how-to” inside the QT package.
6. Make
If you want to use all of your cores to build it, it is better to get JOM from QT and put its path in the PATH environment variable. Otherwise you can run nmake directly.
jom > build.log
or
nmake
7. Make install
Just run nmake install, it will create a final output in the prefix directory in Step 5.
Now that you have built QT 5.6.1 for Maya, you could try to build examples in your QTExamples folder with your customized QT. When finished, you can put the built programs into the Autodesk QT folderbin and it should be working properly. Enjoy:)

Leave a Reply