Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Error on Qt 6 Building from source for Windows Based
Forum Updated to NodeBB v4.3 + New Features

Error on Qt 6 Building from source for Windows Based

Scheduled Pinned Locked Moved Solved Qt 6
59 Posts 9 Posters 20.3k Views 3 Watching
  • 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.
  • J jsulm
    26 Jan 2021, 11:35

    @Lemat said in Error on Qt 6 Building from source for Windows Based:

    "C:\PROGRA~2\Microsoft Visual Studio\2019\COMMUN~1\VC\AUXILI~1\Build\vcvars64.bat" -o CMakeFiles\cmTC_ea43b.dir\CMakeCXXCompilerABI.cpp.obj -c "C:\Program Files\CMake\share\cmake-3.18\Modules\CMakeCXXCompilerABI.cpp"

    This looks strange. This should be the call to the compiler, but instead vcvars64.bat is called. Can you show your script you created as described in the link (qt6vars.cmd)?

    L Offline
    L Offline
    Lemat
    wrote on 26 Jan 2021, 11:48 last edited by
    #16

    @jsulm

    or what is the right compiler path ? this one ?: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\Hostx64\x64

    Time to elevate.

    J 1 Reply Last reply 26 Jan 2021, 11:54
    0
    • L Lemat
      26 Jan 2021, 11:48

      @jsulm

      or what is the right compiler path ? this one ?: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\Hostx64\x64

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 26 Jan 2021, 11:54 last edited by
      #17

      @Lemat I think that path is correct. Visual Studio itself is a x86 application, but it has compiler which generates x86_64 binaries.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      L 1 Reply Last reply 26 Jan 2021, 11:56
      1
      • J jsulm
        26 Jan 2021, 11:54

        @Lemat I think that path is correct. Visual Studio itself is a x86 application, but it has compiler which generates x86_64 binaries.

        L Offline
        L Offline
        Lemat
        wrote on 26 Jan 2021, 11:56 last edited by
        #18

        @jsulm all right

        Time to elevate.

        1 Reply Last reply
        0
        • L Offline
          L Offline
          Lemat
          wrote on 26 Jan 2021, 12:00 last edited by
          #19

          should i set a real compiler path in the system environment variable CXX ?? i don't know the real compiler file name. my actual Qt 5.15.2 has detected it automatically. i am looking in her settings to find the compiler file name, but nothing.

          Time to elevate.

          J 1 Reply Last reply 26 Jan 2021, 12:01
          0
          • L Lemat
            26 Jan 2021, 12:00

            should i set a real compiler path in the system environment variable CXX ?? i don't know the real compiler file name. my actual Qt 5.15.2 has detected it automatically. i am looking in her settings to find the compiler file name, but nothing.

            J Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 26 Jan 2021, 12:01 last edited by
            #20

            @Lemat I don't think so. It should work as described on that web page. I don't know why it doesn't work for you.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • L Offline
              L Offline
              Lemat
              wrote on 26 Jan 2021, 16:23 last edited by
              #21

              i really need help for that. i tried anything, but nothing. Maybe cmake version ?

              Time to elevate.

              1 Reply Last reply
              0
              • L Offline
                L Offline
                Lemat
                wrote on 26 Jan 2021, 16:27 last edited by
                #22

                Tools used:
                Cmake version: 3.18.4 x64
                Python: 3.7.3 x64
                ActivePerl: 5.28 x64
                Ninja: 1.10.2

                Time to elevate.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 26 Jan 2021, 16:31 last edited by
                  #23

                  Hi,

                  IIRC, cmake 3.19.2 or newer is recommended but I don't have the source at hand.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  L 1 Reply Last reply 26 Jan 2021, 19:25
                  0
                  • S SGaist
                    26 Jan 2021, 16:31

                    Hi,

                    IIRC, cmake 3.19.2 or newer is recommended but I don't have the source at hand.

                    L Offline
                    L Offline
                    Lemat
                    wrote on 26 Jan 2021, 19:25 last edited by
                    #24

                    @SGaist

                    Can you explain more ?

                    Time to elevate.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 26 Jan 2021, 19:46 last edited by
                      #25

                      You should update your cmake version.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      L 1 Reply Last reply 26 Jan 2021, 20:59
                      0
                      • S SGaist
                        26 Jan 2021, 19:46

                        You should update your cmake version.

                        L Offline
                        L Offline
                        Lemat
                        wrote on 26 Jan 2021, 20:59 last edited by
                        #26

                        @SGaist

                        Okay. let me try. i am downloading cmake 3.19.3

                        Time to elevate.

                        1 Reply Last reply
                        0
                        • L Offline
                          L Offline
                          Lemat
                          wrote on 27 Jan 2021, 11:12 last edited by
                          #27

                          i tried with cmake 3.19.3, problem still exist

                          Time to elevate.

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on 27 Jan 2021, 18:29 last edited by
                            #28

                            Did you restart from a clean state ?

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            L 1 Reply Last reply 28 Jan 2021, 18:53
                            0
                            • S SGaist
                              27 Jan 2021, 18:29

                              Did you restart from a clean state ?

                              L Offline
                              L Offline
                              Lemat
                              wrote on 28 Jan 2021, 18:53 last edited by
                              #29

                              @SGaist yes. i did it. but the problem still exist

                              Time to elevate.

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on 28 Jan 2021, 19:06 last edited by
                                #30

                                What did you do to ensure a clean state ?

                                Interested in AI ? www.idiap.ch
                                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                1 Reply Last reply
                                0
                                • L Offline
                                  L Offline
                                  Lemat
                                  wrote on 12 Feb 2021, 22:29 last edited by
                                  #31

                                  I Installed Qt 6.0.1 with the online Installer. Too bad for me. Many features such as QWebEngine are removed

                                  Time to elevate.

                                  eyllanescE 1 Reply Last reply 13 Feb 2021, 00:51
                                  0
                                  • L Lemat
                                    12 Feb 2021, 22:29

                                    I Installed Qt 6.0.1 with the online Installer. Too bad for me. Many features such as QWebEngine are removed

                                    eyllanescE Offline
                                    eyllanescE Offline
                                    eyllanesc
                                    wrote on 13 Feb 2021, 00:51 last edited by
                                    #32

                                    @Lemat That and other modules will be added in the new versions during the year, read https://www.qt.io/blog/add-on-support-in-qt-6.0-and-beyond. So you have 2 options: 1) wait or 2) manually compile the modules

                                    If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

                                    L 1 Reply Last reply 13 Feb 2021, 09:30
                                    0
                                    • eyllanescE eyllanesc
                                      13 Feb 2021, 00:51

                                      @Lemat That and other modules will be added in the new versions during the year, read https://www.qt.io/blog/add-on-support-in-qt-6.0-and-beyond. So you have 2 options: 1) wait or 2) manually compile the modules

                                      L Offline
                                      L Offline
                                      Lemat
                                      wrote on 13 Feb 2021, 09:30 last edited by
                                      #33

                                      @eyllanesc ,that is okay !. i just leaned on doc.qt.io. Waiting is the best option for me after failing on this subject title. laugh.

                                      Time to elevate.

                                      1 Reply Last reply
                                      0
                                      • Christian EhrlicherC Offline
                                        Christian EhrlicherC Offline
                                        Christian Ehrlicher
                                        Lifetime Qt Champion
                                        wrote on 13 Feb 2021, 09:36 last edited by
                                        #34

                                        Use 5.15 and you're fine. Don't know why everyone needs to use Qt6 when it's documented that it's not feature complete... Qt6 does not have any advantage for an average user at the current state.

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

                                        L 1 Reply Last reply 7 Mar 2021, 15:10
                                        1
                                        • Chris KawaC Offline
                                          Chris KawaC Offline
                                          Chris Kawa
                                          Lifetime Qt Champion
                                          wrote on 13 Feb 2021, 21:36 last edited by Chris Kawa
                                          #35

                                          This is the do_it.bat I'm using to build Qt6. Adjust the paths and configure options at the top to whatever you like. You only need to have CMake in PATH, nothing else, or you can just spell out its path right in the bat script.

                                          SET VS_ENVIRONMENT="C:\Program Files (x86)\Microsoft Visual Studio 2019\VC\Auxiliary\Build\vcvars64.bat"
                                          SET SRC_DIR="C:\Qt\6.0.1\Src"
                                          SET BUILD_DIR="C:\Qt\6.0.1\Build"
                                          SET INSTALL_DIR="C:\Qt\6.0.1\msvc2019_64"
                                          SET CONFIGURE_OPTIONS=-debug-and-release -mp -opensource -confirm-license
                                          
                                          call %VS_ENVIRONMENT%
                                          mkdir %BUILD_DIR%
                                          mkdir %INSTALL_DIR%
                                          cd %BUILD_DIR%
                                          call %SRC_DIR%\configure -prefix %INSTALL_DIR% %CONFIGURE_OPTIONS%
                                          cmake --build . --parallel
                                          cmake --install .
                                          cmake --install . --config Debug
                                          cd %INSTALL_DIR%
                                          rmdir %BUILD_DIR% /Q /S
                                          pause
                                          

                                          This builds Qt out of source (the only sane way to do it cleanly), copies result to the install directory and removes the temporary build directory (which can get huuuge if you're building everything).

                                          Some notes on the discussion points above:

                                          • Depending on your version of VS (Pro, Cmmunity etc.) the VS install dir will look a bit different. If in doubt just find "x64 Native Tools Command Prompt for VS 2019" shortcut in your start menu and see where it points to
                                          • There are couple of different .bats to set VS environment. For x64 build use either vcvarsall.bat amd64 or a shortcut vcvars64.bat
                                          • Keep source and build directories next to each other e.g. <some path>\src and <some path>\build. Theoretically it should be possible to build out of source to anywhere, but I've had multiple problems with mismatched number of .. and the likes in the past so keep it this way just to make it easier for yourself.
                                          • It's a good idea to exclude whichever modules you don't need in configure options e.g. -skip qtdatavis3d. I usually use only about 3-5 modules and exclude everything else, which cuts down compilation time and output size immensely.
                                          L 1 Reply Last reply 7 Mar 2021, 15:17
                                          1

                                          • Login

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