C++ Team Blog
The latest in C++, Visual Studio, VS Code, and vcpkg from the MSFT C++ team
Latest posts
VCBuild vs. C++ MSBuild on the Command Line
In Visual Studio 2010, the command line tool vcbuild.exe will be replaced by msbuild.exe. The executable change does mean switches will change, too. To help make the migration easier, I have created this table as a quick guide to the new switches and highlight some differences between the tools. The table below isn’t a complete table of all the switches provided in both tools.Migrating to MSBuild requires a new project type with a different extension (vcxproj). Visual Studio comes with two tools for converting existing projects and solutions. When dealing with a single project, the &...
DIA based Stack Walking
Hello, I am Manish Vasani, an SDET on the VC++ compiler backend team. In this series of posts, I will talk about call stacks and how to use the DIA SDK for implementing a stack walking client that builds a call stack. If you are interested in knowing how debuggers build the call stack or want to write an application that dumps the call stack for an executing process, you may want to continue reading further. In this post I’ll start with a brief introduction on stack walking, discuss the DIA APIs for implementing it, and then walkthrough a code sample for a DIA based stack walker. Those who are familiar with...
C++ Native Multi-Targeting
Instructions for native multitargeting in VS2017 can be found here: https://blogs.msdn.microsoft.com/vcblog/2016/02/24/stuck-on-an-older-toolset-version-move-to-visual-studio-2015-without-upgrading-your-toolset/ Hello, my name is Li Shao. I am a Software Design Engineer in Test on the C++ team. For the past two years, I have been part of the team working on migrating the C++ build system from VCBuild to MSBuild as well as the new project system which is also built on top of MSBuild. You can see one of my earlier blogs about the task work that we have done. In this blog, I am going to give an overview of...
/GL and PGO
Hi, I’m Lin Xu, a Program Manager working on the C++ compiler. Recently, we collated performance numbers from our testing passes over this release cycle. We track many different benchmarks closely for all of the architectures and switch options (/O1, /O2, /GL, /PGO). We also track these across multiple CPU models. (Yes, this is quite a big matrix. Look for an upcoming blog post from the QA team to learn more.) We’re pretty excited about the improvements we made for this release in code quality. (Read Ten’s recent post about it here) As I looked at the numbers, one thing jumped out at me: To really take advantage ...
TechEd Europe Demo Session – Face-Lifting MFC Applications on Windows 7
Hello, My name is Damien Watkins, and I am a Program Manager on the Visual C++ team. Today, I thought I would post the “overview script” for my TechEd Europe session – so those who could not attend can try it out for themselves at home. My talk was about the new MFC features we have added in Visual Studio 2010. Just before we get started, I would like to point out that Pat Brenner has been doing some Channel 9 videos on the new MFC functionality too, you can find the first three videos here (and keep your eyes open for more in the future): 1. Pat Brenner: Visual Studio 2010 - M...
Improvements to Find all references in Visual Studio 2010
Hello, my name is Raman Sharma, and I am a Program Manager on the VC++ team. Through this blog post, I wish to highlight some changes we have made to an important feature in the C++ IDE, called “Find all References”. As most of you would know, this feature is used to search for references to any element of your code (classes, class members, functions etc.), inside the entire solution. In Visual Studio 2010, we have made some changes to this feature to provide more flexibility. Let’s look at these changes through an example. Let’s say you have the following piece of code: Figure 1: Sample ...
Visual C++ Precompiled Header Errors on Windows 7
Several customers have encountered the following error while using the Visual C++ compiler on Windows 7: fatal error C1859: 'stdafx.pch' unexpected precompiled header error, simply rerunning the compiler might fix this problem This error manifests under the following conditions:· The Visual C++ compiler is invoked on Windows 7.· Precompiled header (PCH) files are enabled.· /analyze is enabled (this is not a necessary condition, but it increa...
Steps to Open Actionable Bugs
Hi, I am Vaishnavi Sannidhanam, test lead from the Visual C++ Compiler Backend team. I joined Visual C++ team 4 years ago and helped ship VS2005 and VS2008. In this blog, I would like to introduce you to the most effective way of reporting actionable bugs to us.Where to open the bug When you find a bug, the best way for you to report it, is to reach us through Microsoft Connect. To report a bug through Microsoft Connect, open the Connect page (https://connect.microsoft.com/) and click on “Your Dashboard”. Select the project the bug pertains to and proceed with opening the bug.Usage Scenario...
Visual C++ Code Generation in Visual Studio 2010
Hello, I’m Ten Tzen, a Compiler Architect on the Visual C++ Compiler Code Generation team. Today, I’m going to introduce some noteworthy improvements in Visual Studio 2010. Faster LTCG Compilation: LTCG (Link Time Code Generation) allows the compiler to perform better optimizations with information on all modules in the program (for more details see here). To merge information from all modules, LTCG compilation generally takes longer than non-LTCG compilation, particularly for large applications. In VS2010, we improved the information merging process and sped up LTCG compilatio...