I'm having trouble getting c++20 modules to work with Xcode (v11 beta5).
I'm trying this:
// file a.cppm (also tried naming it a.cpp or a.cc)
export module a;
int x;
// file b.cpp
import a; // ERROR: Module 'a' not found.
int y;
y = x;
- I get the ERROR : "Build Time" -> "Parse Issue": Module 'a' not found.
- there are no other warning/errors (and, therefore, it would seem that modules are supported by compiler/linker).
- I note that the build created no precompiled module a.pcm.
My Xcode project build settings are: using clang gnu++2a language dialect + libc++. compiling with -fmodules-ts and -std=c++2a. also enabled "Enable Modules (C and Objective-C) [no option available for C++].
so, my questions:
- does Xcode (10 or 11) clang support c++20 modules? (I wish to avoid using headers)
- if so, what additional configurations do i have to do?
Do i perhaps have to specify explicitly/manually (as compiler arguments) any intermediate output (eg. precompiled .pmc files/paths)? that would however be contrary to the purpose of an IDE, but perhaps Xcode only provides partial support?