QtCreator 10 and C++20 modules
-
@devloop said in QtCreator 10 and C++20 modules:
module
It is probably related to QTCREATORBUG-28465.
-
Hi and welcome to devnet,
Did you enable C++ 20 in your
CMakeLists.txt
? -
Hi @SGaist,
Thank you for your hospitality.
Here what I tried:
cmake_minimum_required(VERSION 3.26) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(LLVM_ENABLE_LIBCXX ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1) set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "aa1f7df0-828a-4fcd-9afc-2dc80491aca7") set(CXX_SCAN_FOR_MODULES ON)
-
Knowing that the
CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API
have to be changed, according to some setup, etc., yes, I can build, from a terminal, with this kind of configuration, for instance with a command likecmake -GNinja .
.But it does not work with Qt Creator.
Indeed, as soon as I add any line related to modules, like
module;
I get an error from Qt Creator:Could not build module 'std'
. -
@devloop said in QtCreator 10 and C++20 modules:
module
It is probably related to QTCREATORBUG-28465.
-
Thanks, but why writing this :
This is the only thing that clangd doesn't do automatically and thats why it shows false-positives errors in current QtCreator (based on outdated BMI).
While it is more than false-positives errors, as it does not even compile from Qt Creator?
-
-