Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Problem building qt static on win 10
QtWS25 Last Chance

Problem building qt static on win 10

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 1.3k 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
    ChortleMortal
    wrote on last edited by ChortleMortal
    #1

    I am trying to build a static version of qt on win 10 and get the following error:

    C:\Qt\5.12.2\Src\qtbase\src\corelib\global\qlibraryinfo.cpp: fatal error C1853: 'qmake_pch.pch' precompiled header file is from a previous version of the compiler, or the precompiled header is C++ and you are using it from C (or vice versa)

    This is surprising since I configured to not use precompiled headers. Here is how I am building the system if this gives any clues, or any of my configure options may be wrong

    "\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"

    configure -static -release -no-pch -platform win32-msvc2017 -confirm-license -prefix "\QtStatic" -opensource -mp -nomake examples -nomake tests -no-icu -no-opengl -no-angle -no-openssl -skip webengine

    Any help would be welcome....

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Did you use a clean source and build directory or did you compile with other options before in there?

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      C 2 Replies Last reply
      2
      • Christian EhrlicherC Christian Ehrlicher

        Did you use a clean source and build directory or did you compile with other options before in there?

        C Offline
        C Offline
        ChortleMortal
        wrote on last edited by ChortleMortal
        #3

        @Christian-Ehrlicher
        It was clean at the beginning, although I have fiddled around with having or not having -no-pch since then. I will nuke the C:\Qt\5.12.2\Src directory and try again, but this will take a few hours.

        1 Reply Last reply
        0
        • Christian EhrlicherC Christian Ehrlicher

          Did you use a clean source and build directory or did you compile with other options before in there?

          C Offline
          C Offline
          ChortleMortal
          wrote on last edited by
          #4

          @Christian-Ehrlicher
          OK. My mistake. I deleted the sources using the maintenance tool, deleted what was left in the Src directory, downloaded, and executed the two commands - and it built perfectly. So I must have done something wrong along the way. I see now the the qmake_pch.pch is build in the configure stage not the nmake stage, so it must have been me who built it with the wrong compiler.

          Apologies for wasting your time. I should have had the sense to rebuild from scratch without needing to be prompted.

          1 Reply Last reply
          1

          • Login

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