Author Topic: Support for c++20 modules  (Read 28699 times)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Support for c++20 modules
« Reply #15 on: August 02, 2021, 03:52:44 pm »
Just expressing "support" is not enough, someone have to do the actual work :)
I don't have anything against adding support for the module system, I currently don't intend to do it.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Waingrove

  • Single posting newcomer
  • *
  • Posts: 7
Re: Support for c++20 modules
« Reply #16 on: August 31, 2024, 06:42:07 pm »
I'm just starting out , again. And I'm learning on c++ 23. Using mingw64.14.1. It does support modules but I do not yet know how to precompile the module using codeblocks, yet. However using gcc is not difficult. Open a cmd in the folder of the project you are working on. Set the path for gcc , if you have not already done so. An example is  "set PATH=C:\Program Files\CodeBlocks\mingw64.14.1\bin;%PATH".  Run the following command: "g++ -std=c++2b -fmodules-ts -c -x c++ <filename.cppm>" .  g++ runs gcc, -std=c++2b : tells gcc to use c++23 , -fmodules-ts tells the compiler you are using modules, -c - Compile or assemble the source files, but do not link. The linking stage simply is not done. The ultimate output is in the form of an object file for each source file., -x forces gcc to use the language specified , c++ , then filename.cppm or however you label module file extension. If successfully built you should see a new folder gcm.cache. And a new object , filename.o in the root folder of your project.

If you figure out how to simply use codeblocks , respond.
« Last Edit: August 31, 2024, 06:46:15 pm by Waingrove »