Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-82571

unable to build static Qt library on Windows 10

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P1: Critical
    • None
    • 5.14.1
    • Build System
    • None
    • Windows 10
    • Windows

    Description

      I encountered this problem when trying to build a static library, but the problem occurs when attempting a conventional build as well. I followed the directions in the readme from here.

      Here's my error:

       

      configure -prefix %CD%\qtbase -opensource -nomake tests
       + cd qtbase
       + C:\qt5\qtbase\configure.bat -top-level -prefix C:\qt5\qtbase -opensource -nomake tests
       Running syncqt ...
       <srcbase> = C:/qt5/qtbase
       <bldbase> = C:/qt5/qtbase
       <outbase> = C:/qt5/qtbase
       Bootstrapping qmake ...
       g++ -c -o main.o -DUNICODE -DMINGW_HAS_SECURE_API=1 -std=c+11 -ffunction-sections -g -IC:/qt5/qtbase/qmake -IC:/qt5/qtbase/qmake/library -IC:/qt5/qtbase/qmake/generators -IC:/qt5/qtbase/qmake/generators/unix -IC:/qt5/qtbase/qmake/generators/win32 -IC:/qt5/qtbase/qmake/generators/mac -I../include -I../include/QtCore -I../include/QtCore/5.14.1 -I../include/QtCore/5.14.1/QtCore -I../src/corelib/global -IC:/qt5/qtbase/mkspecs/win32-g+ -DQT_VERSION_STR=\"5.14.1\" -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=14 -DQT_VERSION_PATCH=1 -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DQT_NO_FOREACH C:/qt5/qtbase/qmake/main.cpp
       In file included from C:/qt5/qtbase/src/corelib/io/qiodevice.h:50:0,
       from ../include/QtCore/qiodevice.h:1,
       from C:/qt5/qtbase/qmake/library/qmakevfs.h:34,
       from C:/qt5/qtbase/qmake/library/qmakeparser.h:33,
       from C:/qt5/qtbase/qmake/library/qmakeevaluator.h:36,
       from C:/qt5/qtbase/qmake/project.h:32,
       from C:/qt5/qtbase/qmake/main.cpp:30:
       ../include/QtCore/qstring.h:1:10: fatal error: ../../src/corelib/tools/qstring.h: No such file or directory
       #include "../../src/corelib/tools/qstring.h"
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       compilation terminated.
       mingw32-make: *** [Makefile:272: main.o] Error 1
      C:\qt5>
      

       

      I did create a qt5vars.cmd file, which I use to define various environment variables:

      @echo off
      REM Edit this location to point to the source code of Qt
      SET _ROOT=C:\qt5
      REM the line below ensures a path to mingw_make.exe exists.
      SET PATH=C:\Qt\Tools\mingw730_32\bin;%PATH%
      SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH%
      REM Uncomment the below line when using a git checkout of the source repository
      SET PATH=%_ROOT%\qtrepotools\bin;%PATH%
      REM Uncomment the below line when building with OpenSSL enabled. If so, make sure the directory points
      REM to the correct location (binaries for OpenSSL).
      REM SET PATH=C:\OpenSSL-Win32\bin;%PATH%
      cd %_ROOT%
      SET _ROOT=
      REM Keeps the command line open when this script is run.
      cmd /k
      
      

       Thanks for any assistance.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtbuildsystem Qt Build System Team
            mzimmers Michael Zimmers
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes