Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. building Qt for Windows (revisited)
QtWS25 Last Chance

building Qt for Windows (revisited)

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
14 Posts 2 Posters 1.8k 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.
  • mzimmersM mzimmers

    @kshegunov I fixed the configure command per your suggestions. Now make fails here:

    g++ -c -include .pch/release/qt_pch.h -fno-keep-inline-dllexport -msse2 -mstackrealign -mfpmath=sse -O3 -std=c++1z -ffunction-sections -fdata-sections -fexceptions -mthreads -Wall -W -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DQFLOAT16_INCLUDE_FAST -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_NO_DEBUG -DPCRE2_CODE_UNIT_WIDTH=16 -DPCRE2_STATIC -I. -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty -I../3rdparty/double-conversion/include -I../3rdparty/double-conversion/include/double-conversion -I../3rdparty/tinycbor/src -I../../include -I../../include/QtCore -I../../include/QtCore/5.12.6 -I../../include/QtCore/5.12.6/QtCore -Itmp -I.moc/release -I.tracegen/release -I../3rdparty/pcre2/src -I../../mkspecs/win32-g++  -o .obj/release/qsignaltransition.o statemachine/qsignaltransition.cpp
    In file included from statemachine/qabstracttransition.cpp:435:0:
    .moc/release/moc_qabstracttransition.cpp:12:10: fatal error: QtCore/QList: No such file or directory
     #include <QtCore/QList>
              ^~~~~~~~~~~~~~
    compilation terminated.
    

    Am I missing a pathname to point to QtCore? Thanks.

    PS: I got some of my configure options from here if you're interested.

    kshegunovK Offline
    kshegunovK Offline
    kshegunov
    Moderators
    wrote on last edited by
    #5

    @mzimmers said in building Qt for Windows (revisited):

    Am I missing a pathname to point to QtCore?

    Not that I know of.

    I got some of my configure options from here if you're interested.

    What are is the exact line you used? (and please include it on every iteration, to make keeping track easier)
    How did you obtain the source and which Qt version is this?

    Read and abide by the Qt Code of Conduct

    1 Reply Last reply
    1
    • mzimmersM Offline
      mzimmersM Offline
      mzimmers
      wrote on last edited by
      #6

      My latest configure command is:

      configure -mp -confirm-license -static -static-runtime -opensource -release -platform win32-g++ -opengl desktop -nomake examples -nomake tests -nomake tools -recheck-all
      

      My make command is:

      mingw32-make -k -j4
      

      Which is in C:\Qt\Tools\mingw730_32\bin.

      I got the source from github, using branch 5.12.6.

      Thanks...

      kshegunovK 1 Reply Last reply
      0
      • mzimmersM mzimmers

        My latest configure command is:

        configure -mp -confirm-license -static -static-runtime -opensource -release -platform win32-g++ -opengl desktop -nomake examples -nomake tests -nomake tools -recheck-all
        

        My make command is:

        mingw32-make -k -j4
        

        Which is in C:\Qt\Tools\mingw730_32\bin.

        I got the source from github, using branch 5.12.6.

        Thanks...

        kshegunovK Offline
        kshegunovK Offline
        kshegunov
        Moderators
        wrote on last edited by kshegunov
        #7

        @mzimmers said in building Qt for Windows (revisited):

        My latest configure command is

        I don't know what -mp does, but everything else seems okay. I'd add -redo to make sure it recompiles qmake so there's no doubt you're working from a clean start.

        My make command is

        What does -k mean?

        I got the source from github, using branch 5.12.6.

        Okay, I usually clone from code.qt.io, but the github mirror should be working fine as well.

        Sorry couldn't be of more help, but it doesn't seem you're doing something wrong. If -redo doesn't help, perhaps (re)start from a clean tree?

        Read and abide by the Qt Code of Conduct

        1 Reply Last reply
        0
        • mzimmersM Offline
          mzimmersM Offline
          mzimmers
          wrote on last edited by
          #8

          -mp is multi-processing (akin to the -j option for make).
          -k, --keep-going Keep going when some targets can't be made.

          I'll start again with the "-redo" and see what happens. Failing that, I'll kill the copy I have and get another, from code.qt.io. I'll report back with my findings.

          Thanks for looking.

          1 Reply Last reply
          0
          • mzimmersM Offline
            mzimmersM Offline
            mzimmers
            wrote on last edited by mzimmers
            #9

            Current steps attempted:

            1. git clone from the Qt (not github) repository (5.12 branch)
            2. add the following (through a script):
            SET _ROOT=C:\qt5
            SET PATH=C:\Qt\Tools\mingw730_32\bin;%PATH%
            SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH%
            
            1. configure as follows:
            configure -mp -confirm-license -static -static-runtime -opensource -release -platform win32-g++ -opengl desktop -nomake examples -nomake tests -nomake tools -recheck-all -prefix /Qt5Static
            
            1. mingw32-make -j4

            I get this error:

            g++ -c -include .pch/release/qt_pch.h -fno-keep-inline-dllexport -msse2 -mstackrealign -mfpmath=sse -O3 -std=c++1z -ffunction-sections -fdata-sections -fexceptions -mthreads -Wall -W -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DQFLOAT16_INCLUDE_FAST -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_NO_DEBUG -DPCRE2_CODE_UNIT_WIDTH=16 -DPCRE2_STATIC -I. -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty -I../3rdparty/double-conversion/include -I../3rdparty/double-conversion/include/double-conversion -I../3rdparty/tinycbor/src -I../../include -I../../include/QtCore -I../../include/QtCore/5.12.7 -I../../include/QtCore/5.12.7/QtCore -Itmp -I.moc/release -I.tracegen/release -I../3rdparty/pcre2/src -I../../mkspecs/win32-g++  -o .obj/release/qcollator.o tools/qcollator.cpp
            In file included from tools/qcollator.cpp:41:0:
            tools/qcollator_p.h:57:10: fatal error: QVector: No such file or directory
             #include <QVector>
                      ^~~~~~~~~
            compilation terminated.
            

            EDIT: I also tried without the -nomake tools (purely as a guess); same results.

            kshegunovK 1 Reply Last reply
            0
            • mzimmersM mzimmers

              Current steps attempted:

              1. git clone from the Qt (not github) repository (5.12 branch)
              2. add the following (through a script):
              SET _ROOT=C:\qt5
              SET PATH=C:\Qt\Tools\mingw730_32\bin;%PATH%
              SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH%
              
              1. configure as follows:
              configure -mp -confirm-license -static -static-runtime -opensource -release -platform win32-g++ -opengl desktop -nomake examples -nomake tests -nomake tools -recheck-all -prefix /Qt5Static
              
              1. mingw32-make -j4

              I get this error:

              g++ -c -include .pch/release/qt_pch.h -fno-keep-inline-dllexport -msse2 -mstackrealign -mfpmath=sse -O3 -std=c++1z -ffunction-sections -fdata-sections -fexceptions -mthreads -Wall -W -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DQFLOAT16_INCLUDE_FAST -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_NO_DEBUG -DPCRE2_CODE_UNIT_WIDTH=16 -DPCRE2_STATIC -I. -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty -I../3rdparty/double-conversion/include -I../3rdparty/double-conversion/include/double-conversion -I../3rdparty/tinycbor/src -I../../include -I../../include/QtCore -I../../include/QtCore/5.12.7 -I../../include/QtCore/5.12.7/QtCore -Itmp -I.moc/release -I.tracegen/release -I../3rdparty/pcre2/src -I../../mkspecs/win32-g++  -o .obj/release/qcollator.o tools/qcollator.cpp
              In file included from tools/qcollator.cpp:41:0:
              tools/qcollator_p.h:57:10: fatal error: QVector: No such file or directory
               #include <QVector>
                        ^~~~~~~~~
              compilation terminated.
              

              EDIT: I also tried without the -nomake tools (purely as a guess); same results.

              kshegunovK Offline
              kshegunovK Offline
              kshegunov
              Moderators
              wrote on last edited by kshegunov
              #10

              I'm out of ideas. My best guess now is to disable the pch (i.e. -no-pch), and I'd suggest removing -mp just to be sure it's not interfering.

              PS.
              Can you try building dynamic binaries, just to compare?

              Read and abide by the Qt Code of Conduct

              mzimmersM 1 Reply Last reply
              1
              • kshegunovK kshegunov

                I'm out of ideas. My best guess now is to disable the pch (i.e. -no-pch), and I'd suggest removing -mp just to be sure it's not interfering.

                PS.
                Can you try building dynamic binaries, just to compare?

                mzimmersM Offline
                mzimmersM Offline
                mzimmers
                wrote on last edited by
                #11

                @kshegunov tried "-no-pch" and removing "-static -static-runtime" and got the same errors.

                I did find windows-requirements, which is interesting, but I never had to manually add any of those things in the past. Do I really need to do that now?

                kshegunovK 1 Reply Last reply
                0
                • mzimmersM mzimmers

                  @kshegunov tried "-no-pch" and removing "-static -static-runtime" and got the same errors.

                  I did find windows-requirements, which is interesting, but I never had to manually add any of those things in the past. Do I really need to do that now?

                  kshegunovK Offline
                  kshegunovK Offline
                  kshegunov
                  Moderators
                  wrote on last edited by
                  #12

                  @mzimmers said in building Qt for Windows (revisited):

                  tried "-no-pch" and removing "-static -static-runtime" and got the same errors.

                  I don't know, sorry. Nothing else comes to mind. :|

                  I did find windows-requirements, which is interesting, but I never had to manually add any of those things in the past. Do I really need to do that now?

                  I don't think so. I haven't done so the last time I build Qt on windows a couple of months or so ago.

                  Read and abide by the Qt Code of Conduct

                  mzimmersM 1 Reply Last reply
                  0
                  • kshegunovK kshegunov

                    @mzimmers said in building Qt for Windows (revisited):

                    tried "-no-pch" and removing "-static -static-runtime" and got the same errors.

                    I don't know, sorry. Nothing else comes to mind. :|

                    I did find windows-requirements, which is interesting, but I never had to manually add any of those things in the past. Do I really need to do that now?

                    I don't think so. I haven't done so the last time I build Qt on windows a couple of months or so ago.

                    mzimmersM Offline
                    mzimmersM Offline
                    mzimmers
                    wrote on last edited by
                    #13

                    I'm going to try 5.13; I can't think of anything else either.

                    1 Reply Last reply
                    1
                    • mzimmersM Offline
                      mzimmersM Offline
                      mzimmers
                      wrote on last edited by
                      #14

                      Update on this: it turns out that there were some artifacts from a prior version of Qt that caused make to look at/use incorrect locations for some files. I blew away the directory and re-cloned.

                      Here are my condensed notes on how to accomplish this (note that this is for a static build):

                      1. $ git clone https://code.qt.io/qt/qt5.git
                      2. $ cd qt5
                      3. $ git checkout v5.14.1 // or whatever
                      4. $ perl init-repository
                      
                      	or 
                      	
                         $ git submodule update --init --recursive
                      5. $ configure -confirm-license -static -static-runtime -opensource -release -platform win32-g++ -opengl desktop -nomake examples -nomake tests -nomake tools -recheck-all -prefix c:\qt5\5.14.1\static
                      6. mingw32-make -j4
                      7. mingw32-make install // if a prefix option was specified in configure
                      

                      Thanks to everyone for the help on a frustrating issue.

                      1 Reply Last reply
                      2

                      • Login

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