Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Build QT 5.9.1 Static to run on Windows 7 x86 and above with dynamic opengl opensll
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Installation and Deployment
2 Posts 2 Posters 2.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Cinohee
    wrote on 20 Apr 2017, 18:51 last edited by Cinohee 8 Jun 2017, 21:15
    #1

    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

    1 Reply Last reply
    1
    • V Offline
      V Offline
      Victor Kozachek
      wrote on 28 Dec 2017, 07:33 last edited by
      #2

      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

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved