On Fri, 3 Apr 2020 at 07:34, Lapo Falcone via Gcc-help <gcc-help@xxxxxxxxxxx> wrote: > > Hello, this is the link to this exact question on Reddit > <https://www.reddit.com/r/gcc/comments/ftm75d/gcc_modules_branch_cmi_mapping/>(in > the GCC subreddit). They told me to ask to this email, so I'll try: > > > -------------------------------------------------------------------------------------------------------- > > > Hello, I've built the module branch of GCC from source. I got the source > via: git clone --branch devel/c++-modules git://gcc.gnu.org/git/gcc.git > SRCDIR > > All seems to work, but I cannot use the feature that was the reason why I > opted for this experimental version: C++20 modules. > > I created a very simple project, where I have a module interface (module1 > in module1.cc) and a main (in Main.cpp). I'm able to compile the module > alone with the line: g++ -fmodules-ts module1.cc -c. It creates a > module1.o file > and a gcm.cache folder, and inside it a module1.gcm file. > > When I try to compile the Main.cpp with g++ -fmodules-ts Main.cpp things > stop working, and I get these errors: > > module: error: failed to read compiled module: No such file or directory > module: note: compiled module file is 'gcm.cache/module.gcm' Shouldn't that be module1.gcm not module.gcm? Are you sure you got the module name right in Main.cpp? It looks to me like you've created a module called "module1" and then said "import module;"