1

When I use the following:

import std.core;

I get the error:

Error   C1011   cannot locate standard module interface. Did you install the library part of the C++ modules feature in VS setup?

I checked the install and I could not find how to install the C++ modules feature. I'm also concerned that this will not be standard enough to compile on both gcc 11.2.0 and VS2022.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
EmilyC137
  • 41
  • 6

1 Answers1

2
  1. Open Visual Studio Installer and make sure C++ Modules for v143 build tools (x64/x86 - experimental) is installed.
  2. Open your project, go to Properties -> C/C++ -> Languages -> Enable Experimental C++ Standard Library Modules and set it to Yes (/experimental:module))

It's still an experimental feature, so you may get some C5050 warning when importing std modules. For more information, you can visit https://learn.microsoft.com/en-us/cpp/cpp/modules-cpp?view=msvc-170

Antidotes
  • 21
  • 3