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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • 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 »

Offline Krice

  • Almost regular
  • **
  • Posts: 152
Re: Support for c++20 modules
« Reply #17 on: October 31, 2024, 02:58:36 pm »
I think modules are trying to fix something in C++ that doesn't exist. No one wanted them and I'm quite sure many people wont use modules in C++ programming. This is just my opinion. It seems like current C++ developers are trying to "fix" the language, just like those who invented new "like C++ but better" languages: Java, D and C# just to name some of them. But they failed to understand that you can't fix something that works, you will be just changing to to another thing, possibly having new kind of problems which did happen with all those languages. They never fixed C++ or made a better version of it.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7699
    • My Best Post
Re: Support for c++20 modules
« Reply #18 on: October 31, 2024, 04:38:19 pm »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline cacb

  • Lives here!
  • ****
  • Posts: 539
Re: Support for c++20 modules
« Reply #19 on: October 31, 2024, 09:31:46 pm »
I think modules are trying to fix something in C++ that doesn't exist.
I agree. I think codeblocks should support important new language features, but frankly I don't see the need for C++ modules. And someone would have to volunteer to do the job.