There seem to be two paths containing Microsoft Visual Studio runtime source files:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\crt\src
and
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include
Some files appear in both directories, but have different sizes. I looked at one file in particular and it had the same method defined in both files.
So my question is, what is the difference in usage for the two paths? I would like to know when I am debugging (I dont mean debug mode) in Visual Studio, which file is the code on the screen?
The CRT sits at the bottom of the Visual C++ libraries stack: the rest of the libraries depend on it and practically all native modules depend on it as well. It contains two kinds of stuff: (1) the C Standard Library and various extensions, and (2) runtime functionality required for things like process startup and exception handling. Because the CRT sits at the bottom of the stack, it is the logical place to start the process of stabilizing the libraries.
From The Great C Runtime (CRT) Refactoring by James McNellis:
(1) We ship most of the sources for the CRT with Visual Studio; you can find them in the Visual Studio installation directory under VC\crt\src
.
(2) In Visual Studio 2013 there are 6,830 #if
, #ifdef
, #ifndef
, #elif
, and #else
directives in the sources that we ship with the product; in the Visual Studio "14" CTP there are 1,656. These numbers do not include directives in headers and they do include the STL source files which are largely untouched by this refactoring effort, so this isn't a perfect measurement, but it's indicative of the amount of cleanup that's been done.