Build QT 5.8 Static to run on Windows 7 x86 and above with dynamic opengl



  • 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

    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.8.0\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.8.0
    
    • Execute the following commands:
    configure -static -debug-and-release -prefix "C:\Qt\Static\5.8.0" -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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.