Where did my C/C++ settings go in Visual Studio?

This is crazy!

A while ago I noticed that the “C/C++” settings block in one of my Visual Studio projects disappeared. I couldn’t change any compilation settings in my project unless I made the changes on a per-file basis, which is really annoying when your project has over a hundred files in it, so I just did without. Well today I needed to change something so I set out to correct the problem.

After an hour mucking with the .vcproj file trying to figure out what happened, I finally discovered something: take all .c and .cpp files your project and the “C/C++” settings block disappears. Well, here’s what happened: in the studio where I work they don’t use .cpp for C++ files, they use .cc.

Add a single .cpp file back to your project and (tada!) you have your C/C++ settings again. *sigh*

One Reply to “Where did my C/C++ settings go in Visual Studio?”

  1. I found your posting while searching for a solution to this problem. Turns out that instead of adding a dummy .cpp file, you can also change the properties of a .cc file in VS from “Document” to “C/C++ Code” and it has the same effect. I’m assuming this works even if you change just one .cc file instead of all of them.

Leave a Reply