-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
Qt Creator 17.0.2, Qt Creator 18.0.0-beta2
-
None
-
Ubuntu 24.04 LTS
- Create a new "Qt Console Application" project using the wizard.
Use defaults, including "CMake for Qt 5 and Qt 6". - Build the project.
That works. - In the project's main.cpp, instantiate a QSvgGenerator object:
QSvgGenerator qsg;
The code model notices that it's an "unknown type name".
- Move the cursor to "QSvgGenerator", trigger quick fixes (Alt+Enter), select "Add #include <QSvgGenerator> and Project Dependency Qt.Svg" and press Enter.
The project cannot be built anymore. In "Compile Output" view, I can read:01:01:19: Running steps for project untitled... 01:01:19: Starting: "/usr/bin/cmake" --build /tmp/projekte/untitled/build/Desktop_Qt_6_10_0-Debug --target all [0/1 0.0/sec] Re-running CMake... -- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so CMake Error at CMakeLists.txt:21 (target_link_libraries): The plain signature for target_link_libraries has already been used with the target "untitled". All uses of target_link_libraries with a target must be either all-keyword or all-plain. The uses of the plain signature are here: * CMakeLists.txt:20 (target_link_libraries) -- Configuring incomplete, errors occurred! FAILED: build.ninja /usr/bin/cmake --regenerate-during-build -S/tmp/projekte/untitled -B/tmp/projekte/untitled/build/Desktop_Qt_6_10_0-Debug ninja: error: rebuilding 'build.ninja': subcommand failed 01:01:19: The command "/usr/bin/cmake --build /tmp/projekte/untitled/build/Desktop_Qt_6_10_0-Debug --target all" terminated with exit code 1. 01:01:19: Error while building/deploying project untitled (kit: Desktop Qt 6.10.0) 01:01:19: When executing step "Build" 01:01:19: Elapsed time: 00:00.
- duplicates
-
QTCREATORBUG-33437 "CMake Component Setup" arbeitet fehlerhaft
-
- Open
-