home
|
C++
|
FAQ
|
technical FAQ
|
publications
|
WG21 papers
|
TC++PL
|
Tour++
|
Programming
|
D&E
|
bio
|
interviews
|
videos
|
quotes
|
applications
|
guidelines
|
compilers
Using C++ Modules
Modified March 21, 2024
Modules is a relatively recent C++ feature (C++20)
and the way to present modules to the compiler and linker unfortunately varies.
Please contact me if you have more useful information.
Microsoft C++
When using Visual Studio.
-
Module files are suffixed .ixx
-
Set the propeties of your project. Tab: Project -> Hello project.
- General properties: Set "C++ language standard" to "latest"
- C/C++ general: Scan for additional module dependencies: "yes"
GCC
CGG uses .cxx for module files
Use -fmodules to use modules.
Clang
Clang uses .cppm for module files.
Use -fmodules to use modules.
home
|
C++
|
FAQ
|
technical FAQ
|
publications
|
WG21 papers
|
TC++PL
|
Tour++
|
Programming
|
D&E
|
bio
|
interviews
|
videos
|
quotes
|
applications
|
guidelines
|
compilers