C++ Team Blog

The latest in C++, Visual Studio, VS Code, and vcpkg from the MSFT C++ team

Latest posts

Mar 22, 2018
Post comments count 0
Post likes count 0

C++ Core Checks in Visual Studio 2017 15.7 Preview 2

Sunny Chatterjee

This post was written by Sergiy Oryekhov. The C++ Core Guidelines Check extension received several new rules in Visual Studio 2017 15.7 Preview 2. The primary focus in this iteration was on the checks that would make it easier to adopt utilities from the Guidelines Support Library. Below is a quick summary of these additions. For more detailed information please see documentation on MSDN: C++ Core Guidelines Checker Reference. If you're just getting started with native code analysis tools, take a look at our introductory Quick Start: Code Analysis for C/C++. New rule sets There is one new rule category added in...

Mar 14, 2018
Post comments count 0
Post likes count 0

Build Time Improvement Recommendation: Turn off /MAP, use PDBs

YongKang Zhu [MSFT]

点这里看中文版 Map file is a plaintext file that contains information about where certain names and symbols exist in a binary produced by the linker. It also contain detailed information on all sections in your binary (code, data, etc.) and which OBJ/LIB each symbol is defined in. The Windows debuggers (like windbg.exe) can use map files to help locate where a program crashed based on a crash address. Map files are an old technology: with modern releases of the MSVC toolset, PDB (Program Database) files do everything map files do and more. Producing a map file takes a long time. If you see the linker switch /MAP in yo...

Mar 13, 2018
Post comments count 10
Post likes count 0

ClangFormat Support in Visual Studio 2017

Augustin Popa

Visual Studio 2017 15.7 Preview 1 comes with built-in ClangFormat support for C++ developers. Specifically, we ship version 5.0 of the clang-format.exe. ClangFormat is a utility that makes it easy to style and format your code based on a set of rules that can be configured in a .clang-format or _clang-format file. This file should be present in your source code directory tree, and applies formatting conventions to all code files at the same level or in any sub-folders. It is easily shareable via source control, so you can enforce coding conventions across your whole development team. Note that Visual Studio al...

Mar 13, 2018
Post comments count 0
Post likes count 0

C++ Code Analysis Improvements for Visual Studio 2017 15.7 Preview 1

Kyle Reed

点这里看中文版 We're making it easier to configure and use the C++ code analysis features with a set of changes targeting 15.7. In the first 15.7 preview we've cleaned up the UI, fixed our documentation links and, most importantly, simplified the way analysis extensions are configured.  If you're not familiar with C++ Core Check, it's a code analysis extension that helps you update your code to be safer and use a more modern style as outlined in the C++ Core Guidelines. You can learn more about the rules we enforce on our reference page. C++ Core Check Extension on by Default We wanted to make it easier for developers ...

Mar 13, 2018
Post comments count 0
Post likes count 0

Linux C++ Workload improvements to the Project System, Linux Console Window, rsync and Attach to Process

Marc Goodner

点这里看中文版 In Visual Studio 2017 15.7 Preview 1 we have made a number of improvements to our support to the Linux C++ workload based on your feedback. You can learn more about our Linux C++ workload in Visual Studio here. MSBuild Project System improvements We added some new properties to Linux projects on the C/C++ General properties page. Max Parallel Compilation Jobs allows you to launch additional compilation processes. The default is 1 but can be increased to improve your build throughput. Public Project Include Directories allows you to specify directories in your project you want exposed to other project...

Feb 23, 2018
Post comments count 0
Post likes count 0

Arithmetic overflow checks in C++ Core Check

Sunny Chatterjee

点这里看中文版 We've improved the C++ Code Analysis toolset with every major compiler update in Visual Studio 2017. Version 15.6, now in Preview, includes a set of arithmetic overflow checks. This article discusses those checks and why you’ll want to enable them in your code. If you’re just getting started with C++ Code Analysis in Visual Studio, learn more about the overall experience in this overview blog post. Motivation As part of the C++ Code Analysis team, we work with groups across the company to identify classes of vulnerabilities that could be detected with better tooling and language support. Recently, as pa...

Feb 20, 2018
Post comments count 0
Post likes count 0

Visual Studio Code C/C++ extension Feb 2018 update

Rong Lu

点这里看中文版 The February 2018 update to the Visual Studio Code C/C++ extension is here! In addition to several bug fixes, this update added colorization for inactive code regions, making it easy to read C and C++ code. You can find the full list of changes in the 0.15.0 release notes. Colorization for inactive regions Inactive code regions that are controlled by conditional-compilation directives, such as #if and #ifdef, are now greyed out in the editor. Join the Insiders program If you have been using, or are interested in using, the C/C++ extension for Visual Studio Code and would like to get early access to the...

Feb 6, 2018
Post comments count 0
Post likes count 0

Vcpkg: introducing installation options with Feature Packages

EricMittelette

We are happy to announce a new feature for vcpkg in version 0.0.103: Feature Packages. Vcpkg is a package manager to help acquiring and building open source libraries on Windows; vcpkg currently offers over 600 C++ libraries available for VS2017 and VS2015. With Feature Packages you have more control over how you build a library as you can specify different options (features). Lots of open source libraries offer different options and features to select at build time. For example, you may want to build OpenCV with CUDA to utilize the GPU or build HDF5 with MSMPI to enable parallel execution. Previously you neede...

Jan 18, 2018
Post comments count 0
Post likes count 0

C++ Core Check in Visual Studio 2017 15.6 Preview 2

Andrew Pardoe

点这里看中文版 This post was written by Sergiy Oryekhov. Note that some of the links to docs.microsoft.com do not yet resolve. Not all of the official documentation has yet been written for this topic. Visual Studio 2017 15.6 Preview 2 includes a set of updates to the C++ Core Guidelines Check extension. We added more checks to help with the effort of making code cleaner, more secure and maintainable. This document is a quick overview of the new rules. More detailed information about these rules as well as an updated list of available rules can be found here: This release also has general improvements in user ...