Reputation: 486
VS2017 comes with the possibility to install Standard Library Modules.
In fact in Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\ifc\
there are ifc module definition files and std.lib
for x86/x64 and Debug/Release. How do we use them? How do you link against them? And what exactly is available in these standard modules?
Upvotes: 7
Views: 4921
Reputation: 106
I got the following code sample working:
import std.core;
int main()
{
std::cout << "Hello world\n";
return 0;
}
by passing these extra parameters to the compiler:
/experimental:module /module:search "path-to-standard-library-ifc-modules"
and providing the full path to std.lib in the ifc folder to the linker
properties->linker->additional dependencies
EDIT:
Adding some additional info since this was the only Google result i found regarding this question:
On my computer these files are located in:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.10.25017\ifc
They are installed when the "standard library modules" component is selected during installation of visual studio 2017.
Upvotes: 9