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. Set up CMake building path in QT5.12.9
Forum Updated to NodeBB v4.3 + New Features

Set up CMake building path in QT5.12.9

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
cmake
3 Posts 2 Posters 1.3k 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.
  • C Offline
    C Offline
    csypt
    wrote on last edited by
    #1

    Not sure is this category right.

    When I start a new project, it started by trying to compile the project, and I got the below error.

    Running C:\Program Files\CMake\bin\cmake.exe "-GCodeBlocks - NMake Makefiles JOM" -C C:\Users\erinli2-t\AppData\Local\Temp\QtCreator-wYLTiH\qtc-cmake-FKdjgwtE\qtcsettings.cmake C:/Users/erinli2-t/Documents/test in C:\Users\erinli2-t\AppData\Local\Temp\QtCreator-wYLTiH\qtc-cmake-FKdjgwtE.
    loading initial cache file C:\Users\erinli2-t\AppData\Local\Temp\QtCreator-wYLTiH\qtc-cmake-FKdjgwtE\qtcsettings.cmake
    CMake Deprecation Warning:
      Support for "Extra Generators" like
    
        CodeBlocks
    
      is deprecated and will be removed from a future version of CMake.  IDEs may
      use the cmake-file-api(7) to view CMake-generated project build trees.
    
    
    -- The CXX compiler identification is unknown
    CMake Error at CMakeLists.txt:3 (project):
      The CMAKE_CXX_COMPILER:
    
        cl
    
      is not a full path and was not found in the PATH.
    
      To use the JOM generator with Visual C++, cmake must be run from a shell
      that can use the compiler cl from the command line.  This environment is
      unable to invoke the cl compiler.  To fix this problem, run cmake from the
      Visual Studio Command Prompt (vcvarsall.bat).
    
      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.
    
    
    -- Configuring incomplete, errors occurred!
    CMake process exited with exit code 1.
    Elapsed time: 00:00.
    

    I've searched for Google that I can use

    cmake -G "Visual Studio 17 2022"
    

    to build. But how can I change the ""-GCodeBlocks - NMake Makefiles JOM"" in the first line of error? Or how can I fix this error? Thanks in advance.

    Christian EhrlicherC 1 Reply Last reply
    0
    • Christian EhrlicherC Christian Ehrlicher moved this topic from Installation and Deployment on
    • C csypt

      Not sure is this category right.

      When I start a new project, it started by trying to compile the project, and I got the below error.

      Running C:\Program Files\CMake\bin\cmake.exe "-GCodeBlocks - NMake Makefiles JOM" -C C:\Users\erinli2-t\AppData\Local\Temp\QtCreator-wYLTiH\qtc-cmake-FKdjgwtE\qtcsettings.cmake C:/Users/erinli2-t/Documents/test in C:\Users\erinli2-t\AppData\Local\Temp\QtCreator-wYLTiH\qtc-cmake-FKdjgwtE.
      loading initial cache file C:\Users\erinli2-t\AppData\Local\Temp\QtCreator-wYLTiH\qtc-cmake-FKdjgwtE\qtcsettings.cmake
      CMake Deprecation Warning:
        Support for "Extra Generators" like
      
          CodeBlocks
      
        is deprecated and will be removed from a future version of CMake.  IDEs may
        use the cmake-file-api(7) to view CMake-generated project build trees.
      
      
      -- The CXX compiler identification is unknown
      CMake Error at CMakeLists.txt:3 (project):
        The CMAKE_CXX_COMPILER:
      
          cl
      
        is not a full path and was not found in the PATH.
      
        To use the JOM generator with Visual C++, cmake must be run from a shell
        that can use the compiler cl from the command line.  This environment is
        unable to invoke the cl compiler.  To fix this problem, run cmake from the
        Visual Studio Command Prompt (vcvarsall.bat).
      
        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.
      
      
      -- Configuring incomplete, errors occurred!
      CMake process exited with exit code 1.
      Elapsed time: 00:00.
      

      I've searched for Google that I can use

      cmake -G "Visual Studio 17 2022"
      

      to build. But how can I change the ""-GCodeBlocks - NMake Makefiles JOM"" in the first line of error? Or how can I fix this error? Thanks in advance.

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      When I start a new project, it started by trying to compile the project, and I got the below error.

      Which IDE? QtCreator? Visual Studio (Code) or something else?

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

      C 1 Reply Last reply
      0
      • Christian EhrlicherC Christian Ehrlicher

        When I start a new project, it started by trying to compile the project, and I got the below error.

        Which IDE? QtCreator? Visual Studio (Code) or something else?

        C Offline
        C Offline
        csypt
        wrote on last edited by
        #3

        @Christian-Ehrlicher QT Creator, btw I solved by changing the CMake generator in project -> manage kits -> kits :D

        1 Reply Last reply
        0
        • C csypt has marked this topic as solved on

        • Login

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