Skip to content

Every2/How-to-use-and-enable-modules-in-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Modules in C++

I'm using G++ 13 on OpenSuse, this's my version. Make sure you've the same version or above.

gcc_version

First of all, compile iostream to a module.

g++ -fmodules-ts -x c++-system-header iostream  

If you see this folder, everything worked!

image_of_folder

Now, you can use the code here! Just run:

g++ -fmodules-ts sum.cpp main.cpp -o sum && ./sum

If you see the number 3 in your terminal, everything worked!

About

Example how to use modules in C++20 (GCC 13)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages