Build QT 5.9.1 Static to run on Windows 7 x86 and above with dynamic opengl opensll
-
wrote on 20 Apr 2017, 18:51 last edited by Cinohee 8 Jun 2017, 21:15
Hello.
Finally after 4 days working I found this solution.
Maybe help you also :)My working solution step by step:
- Install fresh windows 7 on VMware and update to latest version (Windows 7 x86 SP1) with Accelerate Direct 3D or any windows 7 installed on your computer
- Install visual studio 2015 Update3 with visual c++
- Install DirectX Sdk latest version
Download
-
Visit http://info.qt.io/download-qt-for-application-development
-
list itemSelect “Get your open source package“
-
list itemClick “View All Downloads“
-
list itemDownload source package for Windows users as a single zip file (565 MB)
-
Download openSll for windows
Build a static version of Qt using Microsoft Visual Studio: -
list itemDownload and Install Perl (http://www.activestate.com/activeperl/downloads).
-
Download and Install Python (https://www.python.org/downloads/).
-
Make sure that Microsoft Visual Studio is installed.
-
Restart system
-
Create directory: “C:\Qt\Static“
-
Copy downloaded Qt archive to this folder and extract it there. “C:\Qt\Static\qt-everywhere-opensource-src-5.8.0“
-
Edit file “C:\Qt\Static\qt-everywhere-opensource-src-5.9.1\qtbase\mkspecs\common\msvc-desktop.conf” and replace all MD to MT to remove dependency on msvc dlls, in the following lines:
QMAKE_CFLAGS_RELEASE = -O2 -MD QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi QMAKE_CFLAGS_DEBUG = -Zi -MDd
QMAKE_CFLAGS_RELEASE = -O2 -MT QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MT -Zi QMAKE_CFLAGS_DEBUG = -Zi -MTd
- Start the Visual Studio 2015 Command Prompt (VS2015 x86 Native Tools Command Prompt).
- Change directory to source code download folder.
cd C:\Qt\Static\qt-everywhere-opensource-src-5.9.1
- Execute the following commands:
configure -LC:\OpenSSL-Win32\lib -IC:\OpenSSL-Win32\include -static -debug-and-release -ssl -openssl -openssl-linked -prefix "C:\Qt\Static\5.9.1" -platform win32-msvc2015 -qt-zlib -opensource -confirm-license -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -sql-odbc -sql-sqlite -skip qt3d -skip qttools -opengl dynamic -make libs -nomake tools -skip qtdoc -skip qtwayland -skip qtwebview -skip qtwebengine -skip qtwebchannel -no-qml-debug -skip qtscript -no-icu -no-compile-examples -nomake examples -nomake tests
nmake
nmake install
Wait until finished :)
Jobs done.
Now work on all OS version above Windows 7
Now build project by this Qt -
wrote on 28 Dec 2017, 07:33 last edited by
Hi,
Thank you so much for this cool instruction. It works fine for me. Tell me please, how to add multimedia module support during QT compilation?
Regards,
Victor