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?
The C runtime Library (CRT) is the part of the C++ Standard Library that incorporates the ISO C standard library. The Visual C++ libraries that implement the CRT support native code development, and both mixed native and managed code. All versions of the CRT support multi-threaded development.
A module is a set of source code files that are compiled independently of the translation units that import them. Modules eliminate or reduce many of the problems associated with the use of header files. They often reduce compilation times.
MSVCRT vs UCRT These are two variants of the C standard library on Microsoft Windows. MSVCRT (Microsoft Visual C++ Runtime) is available by default on all Microsoft Windows versions, but due to backwards compatibility issues is stuck in the past, not C99 compatible and is missing some features.
The Redistributable is available in the my.visualstudio.com Downloads section as Visual C++ Redistributable for Visual Studio 2019 - Version 16.7. Use the Search box to find this version. To download the files, select the platform and language you need, and then choose the Download button.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With