'Using c++20 modules with Visual Studio and Clang-cl 13

Recently, I tried to use modules with VS2022, Clang-cl-13. I followed the instructions I found. Enabled std:c++latest and experimental:module. Created a most-basic module file (Module.ixx):

export module Module;

export int MyFunc()
{
    return 1;
}

Imported it in another file and used it, and Clang gives me a module 'Module' not found error. The same program works when I switch the compiler to the MS compiler. Did I miss a step with Clang or are modules not supported yet?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source