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. CMake generator error
Forum Update on Monday, May 27th 2025

CMake generator error

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
cmakeqt 6.2.4
7 Posts 4 Posters 6.1k 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.
  • A Offline
    A Offline
    Aymeric_Qt
    wrote on last edited by
    #1

    Hello,

    I've tried to re-open an "old" project made before I had to re-setup Windows. Since then I have the following error message when I try to build the project:
    "Generator: execution of make failed. Make command was: C:/mingw64/bin/ninja.exe all &&"

    I've googled this error message but I did not find anything within my understanding level (a CMake configuration problem on Windows 10 ?).
    However I've tried to change the CMake generator in the projetc settings to MinGW Makefiles (as it is the compiler use for the project) but it did not solve the problem.

    If you have any idea about what is wrong and how to solve it, let me know.

    Thanks for reading.

    1 Reply Last reply
    0
    • kkoehneK Offline
      kkoehneK Offline
      kkoehne
      Moderators
      wrote on last edited by
      #6

      @Aymeric_Qt said in CMake generator error:

      "Generator: execution of make failed. Make command was: C:/mingw64/bin/ninja.exe all &&"

      Try to do a clean build of your project, by either deleting the build directory / CMakeCache.txt file in the build directory manually, or by running 'Clear CMake Configuration' from Qt Creator's 'Build' menu.

      Director R&D, The Qt Company

      A 1 Reply Last reply
      1
      • C Offline
        C Offline
        ChrisW67
        wrote on last edited by
        #2

        @Aymeric_Qt said in CMake generator error:

        C:/mingw64/bin/ninja.exe

        Does that file exist?

        1 Reply Last reply
        0
        • A Offline
          A Offline
          Aymeric_Qt
          wrote on last edited by
          #3

          Hello,

          Thank you for your reply and sorry for this late answer.
          Actually no the file does not exist. I have a mingw_64 folder in the Qt folder (C:\Qt<Qt version>\mingw_64\bin) but there is no ninja.exe file.
          It seems that mingw uses ninja but ninja is not in the right folder.
          However I've checked in the maintenance tool and Ninja is indeed installed.
          But I don't really understand why ninja is suddenly required (maybe it was before) and why Make try to get mingw at C root and not in the Qt folder.
          Therefore I don't know what to do.
          Do I have to install mingw my self (but why) ?
          Or do I need to configure CMake or Make and if how ?
          Or do I miss the point ?

          jsulmJ 1 Reply Last reply
          1
          • A Aymeric_Qt

            Hello,

            Thank you for your reply and sorry for this late answer.
            Actually no the file does not exist. I have a mingw_64 folder in the Qt folder (C:\Qt<Qt version>\mingw_64\bin) but there is no ninja.exe file.
            It seems that mingw uses ninja but ninja is not in the right folder.
            However I've checked in the maintenance tool and Ninja is indeed installed.
            But I don't really understand why ninja is suddenly required (maybe it was before) and why Make try to get mingw at C root and not in the Qt folder.
            Therefore I don't know what to do.
            Do I have to install mingw my self (but why) ?
            Or do I need to configure CMake or Make and if how ?
            Or do I miss the point ?

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #4

            @Aymeric_Qt Ninja is not required. Usually if you want to use Ninja you have to tell CMake so: cmake -GNinja ...
            So, how do you call CMake?

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

            1 Reply Last reply
            0
            • A Offline
              A Offline
              Aymeric_Qt
              wrote on last edited by Aymeric_Qt
              #5

              Hello @jsulm,
              I call CMake simply by lauching a build of the project in Qt Creator, nothing more than that.

              1 Reply Last reply
              0
              • kkoehneK Offline
                kkoehneK Offline
                kkoehne
                Moderators
                wrote on last edited by
                #6

                @Aymeric_Qt said in CMake generator error:

                "Generator: execution of make failed. Make command was: C:/mingw64/bin/ninja.exe all &&"

                Try to do a clean build of your project, by either deleting the build directory / CMakeCache.txt file in the build directory manually, or by running 'Clear CMake Configuration' from Qt Creator's 'Build' menu.

                Director R&D, The Qt Company

                A 1 Reply Last reply
                1
                • kkoehneK kkoehne

                  @Aymeric_Qt said in CMake generator error:

                  "Generator: execution of make failed. Make command was: C:/mingw64/bin/ninja.exe all &&"

                  Try to do a clean build of your project, by either deleting the build directory / CMakeCache.txt file in the build directory manually, or by running 'Clear CMake Configuration' from Qt Creator's 'Build' menu.

                  A Offline
                  A Offline
                  Aymeric_Qt
                  wrote on last edited by
                  #7

                  Hello @kkoehne
                  Thank you for thi really quick reply!
                  I've run Clear CMake Configuration and it worked!

                  Quick note: Just after clearing CMake Configuration the build was failling with some error message including: "Could not load cache".
                  I've just restarted QtCreator and everything was fine.

                  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