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. Fail to configure Src
Forum Updated to NodeBB v4.3 + New Features

Fail to configure Src

Scheduled Pinned Locked Moved Solved Qt 6
9 Posts 4 Posters 857 Views 1 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.
  • P Offline
    P Offline
    pedisChen
    wrote on 2 Mar 2024, 16:55 last edited by
    #1

    how can I fix it? Thx

    C:\Qt\6.5.3\Src>configure.bat -static -prefix "C:\Qt\6.5.2\msvc2022_64_static" -release

    • cd qtbase

    • C:\Qt\6.5.3\Src\qtbase\configure.bat -top-level -static -prefix "C:\Qt\6.5.2\msvc2022_64_static" -release
      -- Windows 10 SDK version:
      'C:/Program Files/CMake/bin/cmake.exe' '-DBUILD_SHARED_LIBS=OFF' '-DCMAKE_INSTALL_PREFIX=C:/Qt/6.5.2/msvc2022_64_static' '-DCMAKE_BUILD_TYPE=Release' '-G' 'Ninja' 'C:/Qt/6.5.3/Src'
      -- The CXX compiler identification is unknown
      -- The C compiler identification is unknown
      -- The ASM compiler identification is unknown
      -- Didn't find assembler
      CMake Error at CMakeLists.txt:22 (project):
      No CMAKE_CXX_COMPILER could be found.

      Tell CMake where to find the compiler by setting either the environment
      variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
      to the compiler, or to the compiler name if it is in the PATH.

    CMake Error at CMakeLists.txt:22 (project):
    No CMAKE_C_COMPILER could be found.

    Tell CMake where to find the compiler by setting either the environment
    variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
    the compiler, or to the compiler name if it is in the PATH.

    CMake Error at CMakeLists.txt:22 (project):
    No CMAKE_ASM_COMPILER could be found.

    Tell CMake where to find the compiler by setting either the environment
    variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
    to the compiler, or to the compiler name if it is in the PATH.

    -- Warning: Did not find file Compiler/-ASM
    -- Configuring incomplete, errors occurred!
    CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:993 (message):
    CMake exited with code 1.

    C 1 Reply Last reply 2 Mar 2024, 17:26
    0
    • P pedisChen
      2 Mar 2024, 16:55

      how can I fix it? Thx

      C:\Qt\6.5.3\Src>configure.bat -static -prefix "C:\Qt\6.5.2\msvc2022_64_static" -release

      • cd qtbase

      • C:\Qt\6.5.3\Src\qtbase\configure.bat -top-level -static -prefix "C:\Qt\6.5.2\msvc2022_64_static" -release
        -- Windows 10 SDK version:
        'C:/Program Files/CMake/bin/cmake.exe' '-DBUILD_SHARED_LIBS=OFF' '-DCMAKE_INSTALL_PREFIX=C:/Qt/6.5.2/msvc2022_64_static' '-DCMAKE_BUILD_TYPE=Release' '-G' 'Ninja' 'C:/Qt/6.5.3/Src'
        -- The CXX compiler identification is unknown
        -- The C compiler identification is unknown
        -- The ASM compiler identification is unknown
        -- Didn't find assembler
        CMake Error at CMakeLists.txt:22 (project):
        No CMAKE_CXX_COMPILER could be found.

        Tell CMake where to find the compiler by setting either the environment
        variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
        to the compiler, or to the compiler name if it is in the PATH.

      CMake Error at CMakeLists.txt:22 (project):
      No CMAKE_C_COMPILER could be found.

      Tell CMake where to find the compiler by setting either the environment
      variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
      the compiler, or to the compiler name if it is in the PATH.

      CMake Error at CMakeLists.txt:22 (project):
      No CMAKE_ASM_COMPILER could be found.

      Tell CMake where to find the compiler by setting either the environment
      variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
      to the compiler, or to the compiler name if it is in the PATH.

      -- Warning: Did not find file Compiler/-ASM
      -- Configuring incomplete, errors occurred!
      CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:993 (message):
      CMake exited with code 1.

      C Offline
      C Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on 2 Mar 2024, 17:26 last edited by
      #2

      From Visual Studio folder in the start menu run "x64 Native Tools Command Prompt for VS 2022". This will open a command prompt and set up an environment with the necessary compiler paths. Run your commands from this command prompt.

      P 1 Reply Last reply 3 Mar 2024, 07:26
      3
      • R Offline
        R Offline
        Ronel_qtmaster
        wrote on 2 Mar 2024, 19:14 last edited by
        #3

        @pedisChen you need to add the path to the compiler in environments variables

        MINGW32 C:.......\MinGW32\bin for exemple.
        After that restart the command prompt and run the configure script again

        C 1 Reply Last reply 2 Mar 2024, 19:55
        0
        • R Ronel_qtmaster
          2 Mar 2024, 19:14

          @pedisChen you need to add the path to the compiler in environments variables

          MINGW32 C:.......\MinGW32\bin for exemple.
          After that restart the command prompt and run the configure script again

          C Offline
          C Offline
          Chris Kawa
          Lifetime Qt Champion
          wrote on 2 Mar 2024, 19:55 last edited by
          #4

          @Ronel_qtmaster No, polluting system wide environment with development paths is bad practice. That's what those predefined command prompt scripts I mentioned are. Keep your environment nice and clean and you'll avoid a lot of problems.

          R 1 Reply Last reply 2 Mar 2024, 20:24
          1
          • C Chris Kawa
            2 Mar 2024, 19:55

            @Ronel_qtmaster No, polluting system wide environment with development paths is bad practice. That's what those predefined command prompt scripts I mentioned are. Keep your environment nice and clean and you'll avoid a lot of problems.

            R Offline
            R Offline
            Ronel_qtmaster
            wrote on 2 Mar 2024, 20:24 last edited by
            #5

            @Chris-Kawa I understand your point.However when you need to use mingw for many other purposes (not only cmake build) you will need to add it in the environments variables.

            C 1 Reply Last reply 2 Mar 2024, 20:31
            0
            • R Ronel_qtmaster
              2 Mar 2024, 20:24

              @Chris-Kawa I understand your point.However when you need to use mingw for many other purposes (not only cmake build) you will need to add it in the environments variables.

              C Offline
              C Offline
              Chris Kawa
              Lifetime Qt Champion
              wrote on 2 Mar 2024, 20:31 last edited by
              #6

              @Ronel_qtmaster Until, of course, you need two toolchains and then you have to constantly juggle... No, you can set up your environment on the build chain basis, not globally.
              Besides, OP clearly is using MSVC, and I've never encountered a setup where you'd need global variables for that.

              1 Reply Last reply
              1
              • C Chris Kawa
                2 Mar 2024, 17:26

                From Visual Studio folder in the start menu run "x64 Native Tools Command Prompt for VS 2022". This will open a command prompt and set up an environment with the necessary compiler paths. Run your commands from this command prompt.

                P Offline
                P Offline
                pedisChen
                wrote on 3 Mar 2024, 07:26 last edited by
                #7

                @Chris-Kawa Thank for your help,follow your suggestion,I have solved this problem. But now,I also want to compile a 32bit version qt from src by MSVC2022.How can I do that?

                Christian EhrlicherC 1 Reply Last reply 3 Mar 2024, 08:05
                0
                • P pedisChen
                  3 Mar 2024, 07:26

                  @Chris-Kawa Thank for your help,follow your suggestion,I have solved this problem. But now,I also want to compile a 32bit version qt from src by MSVC2022.How can I do that?

                  Christian EhrlicherC Offline
                  Christian EhrlicherC Offline
                  Christian Ehrlicher
                  Lifetime Qt Champion
                  wrote on 3 Mar 2024, 08:05 last edited by
                  #8

                  @pedisChen You already asked it here: https://forum.qt.io/topic/155034/how-to-compile-32bit-qt6-5-3-from-src/ and also got an answer...

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

                  P 1 Reply Last reply 3 Mar 2024, 08:15
                  0
                  • P pedisChen has marked this topic as solved on 3 Mar 2024, 08:14
                  • Christian EhrlicherC Christian Ehrlicher
                    3 Mar 2024, 08:05

                    @pedisChen You already asked it here: https://forum.qt.io/topic/155034/how-to-compile-32bit-qt6-5-3-from-src/ and also got an answer...

                    P Offline
                    P Offline
                    pedisChen
                    wrote on 3 Mar 2024, 08:15 last edited by
                    #9

                    @Christian-Ehrlicher Thank you very much!

                    1 Reply Last reply
                    0

                    1/9

                    2 Mar 2024, 16:55

                    • Login

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