C++ 20 experimental std Modules not accessible with latest MSVC experimental tools enabled

1.3k Views Asked by At

The following doesn't compile with what is latest and greatest from Microsoft MSVC. Advertised last year as able to run the following:

Project Settings Changed:

/EHsc                 (required: C++ exceptions)
/MD                   (required: Multi-threaded DLL)
/experimental:module  (required: enable C++ 20 standard [experimental] modules)
/std:c++latest        (required: enable latest draft)

app.cpp:

import std.core;

int main(int argc, const char* argv) {
    std::cout << "test\n";
    return 0;
}

I got interested from reading this post: https://learn.microsoft.com/en-us/cpp/cpp/modules-cpp?view=msvc-170

I simply cannot get it running. My version is Visual Studio 2022 17.1.4, the latest version. I have all build tool versions installed that are available for selection. I started with the latest, and that gave me this error so I added more, and that did nothing. Everything C++ and SDK-related are installed.

fatal error C1011: Cannot locate standard module interface. Did you install the library part of the C++ modules feature in VS setup?

And that's not actually a 'package' you can select from in the installer. I do have all the build tools for all C++ versions. I suppose it didn't install it but I have no idea what else I can install here. I have absolutely everything selected. I think this feature was simply broken for this release but I cannot downgrade to an older version as used in the tutorial.

0

There are 0 best solutions below