C++ / Documentation search
Find the error. Find the next step.
Search by diagnostic code, copied message, or symptom. Filter by content and project system.
7 results
Browse documentation →Precompiled headers in Visual Studio
How to set up a precompiled header (pch.h, /Yc and /Yu) in a Visual Studio C++ project, what to put in it, and how to fix its errors.
Speed up C++ builds in Visual Studio
Make MSVC builds faster: measure them, compile in parallel with /MP, use precompiled headers, include less, and link faster in Debug.
C++ Build Insights
Microsoft's tools and tutorials for investigating build bottlenecks, parallelism, and repeated header parsing.
Precompiled headers in Visual Studio: Set it up
Create pch.h with the stable headers the project uses most, for example <windows.h> , <string> , <vector> , and third-party libraries. Create pch.cpp that contains only #include "pch.h" . In the project properties, for all configurations,…
Precompiled headers in Visual Studio: What to put in it
Headers that are large, included by many files, and rarely changed: system headers, the standard library, and external libraries. Keep your own headers out of it, or only the most stable ones: each change to a header in pch.h recompiles…
Speed up C++ builds in Visual Studio: Compile files in parallel
For MSBuild C++ projects, check C/C++ > General > Multi-processor Compilation ( /MP ): it lets an MSVC compiler invocation compile multiple source files in parallel. It may already be enabled by your project template. Visual Studio also…
Speed up C++ builds in Visual Studio: Keep Debug builds light
Whole Program Optimization ( /GL and /LTCG ) belongs in Release only: in Debug it delays all code generation to the link. Linker > General > Enable Incremental Linking should be Yes in Debug, so that a small change relinks quickly. Give…