When building a project using CMake, an error occurs when generating the target
-
wrote on 26 Jun 2024, 06:42 last edited by
I've previously built four or five projects for learning with no problems, and today, about three or four days apart, I've noticed that no matter how I recreate a new project, it shows an error:
:-1: error: [CMakeFiles\apptest.dir\build.make:88: apptest_qmltyperegistrations.cpp] Error 1
This is the CMake I installed:
This is the CMake configuration:
How to resolve this error message?
-
I've previously built four or five projects for learning with no problems, and today, about three or four days apart, I've noticed that no matter how I recreate a new project, it shows an error:
:-1: error: [CMakeFiles\apptest.dir\build.make:88: apptest_qmltyperegistrations.cpp] Error 1
This is the CMake I installed:
This is the CMake configuration:
How to resolve this error message?
@Alex0718 Do you use CMake provided together with Qt?
-
You did not answer the question. I know that you installed CMake provided by the Qt installer. But the question is: do you also use it? Check the Kit you're using: which CMake executable is selected there?
-
wrote on 26 Jun 2024, 14:06 last edited by
Please do try to install "Ninja" from the Qt SDK or from https://github.com/ninja-build/ninja/releases. Make sure that you Kit has the "Ninja" generator selected for the CMake generator.
Then do a clean build of your application. (Build > Clear CMake Configuration and afterwards Build > Run CMake)
-
You did not answer the question. I know that you installed CMake provided by the Qt installer. But the question is: do you also use it? Check the Kit you're using: which CMake executable is selected there?
-
Please do try to install "Ninja" from the Qt SDK or from https://github.com/ninja-build/ninja/releases. Make sure that you Kit has the "Ninja" generator selected for the CMake generator.
Then do a clean build of your application. (Build > Clear CMake Configuration and afterwards Build > Run CMake)
wrote on 27 Jun 2024, 02:34 last edited by@cristian-adam Thanks, I'll try your solution.
-
wrote on 27 Jul 2024, 04:51 last edited by
Have you solved it now?