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 Update on Monday, May 27th 2025

Fail to configure Src

Scheduled Pinned Locked Moved Solved Qt 6
9 Posts 4 Posters 780 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.
  • pedisChenP Offline
    pedisChenP Offline
    pedisChen
    wrote on 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.

    Chris KawaC 1 Reply Last reply
    0
    • pedisChenP pedisChen

      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.

      Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on 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.

      pedisChenP 1 Reply Last reply
      3
      • Ronel_qtmasterR Offline
        Ronel_qtmasterR Offline
        Ronel_qtmaster
        wrote on 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

        Chris KawaC 1 Reply Last reply
        0
        • Ronel_qtmasterR Ronel_qtmaster

          @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

          Chris KawaC Offline
          Chris KawaC Offline
          Chris Kawa
          Lifetime Qt Champion
          wrote on 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.

          Ronel_qtmasterR 1 Reply Last reply
          1
          • Chris KawaC Chris Kawa

            @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.

            Ronel_qtmasterR Offline
            Ronel_qtmasterR Offline
            Ronel_qtmaster
            wrote on 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.

            Chris KawaC 1 Reply Last reply
            0
            • Ronel_qtmasterR Ronel_qtmaster

              @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.

              Chris KawaC Offline
              Chris KawaC Offline
              Chris Kawa
              Lifetime Qt Champion
              wrote on 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
              • Chris KawaC Chris Kawa

                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.

                pedisChenP Offline
                pedisChenP Offline
                pedisChen
                wrote on 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
                0
                • pedisChenP pedisChen

                  @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 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

                  pedisChenP 1 Reply Last reply
                  0
                  • pedisChenP pedisChen has marked this topic as solved on
                  • Christian EhrlicherC Christian Ehrlicher

                    @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...

                    pedisChenP Offline
                    pedisChenP Offline
                    pedisChen
                    wrote on last edited by
                    #9

                    @Christian-Ehrlicher Thank you very much!

                    1 Reply Last reply
                    0

                    • Login

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