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. Qt Creator C++20 module autocompletion / clang parser
Forum Update on Monday, May 27th 2025

Qt Creator C++20 module autocompletion / clang parser

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
1 Posts 1 Posters 1.2k 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.
  • M Offline
    M Offline
    Max.S12
    wrote on 19 May 2021, 13:26 last edited by
    #1

    Hi,

    I'm trying to get C++20 modules to work with Qt Creator. I got it to compile with CMake 3.20.2 but the Qt Creator Editor integration is not working 100%. I cant autocomplete exported stuff and clang can't find any imported module. I tried with a modmap and different clang flags but the best result was a message from the parser: "can't build module xxx".

    Is there a way to get this to work or is this just not supported by QT Creator 4.15?

    For people who want to compile their Qt Project with C++ modules and CMake:
    CMakeList (tested with gcc 11.1)

    cmake_minimum_required(VERSION 3.20)
    set(CMAKE_CXX_STANDARD 20)
    set(CMAKE_CXX_STANDARD_REQUIRED True)
    set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP true)
    target_compile_options(example PRIVATE -fmodules-ts)
    
    1 Reply Last reply
    2

    1/1

    19 May 2021, 13:26

    • Login

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