Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22145

How to compile C++ code using modules-ts and gcc (experimental)?

$
0
0

I've been trying to code something using the new experimental feature "modules-ts" that will be included in c++20. I've cloned the gcc branch (found here: https://gcc.gnu.org/wiki/cxx-modules), and I'm trying to follow that tutorial (on the link) using modules-ts but an g++ error is preventing me from doing that:

g++: error: unrecognized command-line option ‘-fmodules-ts’

I tried to see the version of g++, to make sure that is not reading from another previous version. And the answer is:

g++ (GCC) 10.0.0 20191029 (experimental) Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Here is the command that I'm trying to run:

g++ -fmodules-ts hello.cppm main.cpp


Viewing all articles
Browse latest Browse all 22145

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>