numerical25
numerical25

Reputation: 10790

can not find C/C++ in project properties

I am following a tutorial and one of the steps its asking is to go to my projects properties and click on c/c++ and add a path to "Additional Include Directories" property. I am using visual C++ Express Edition 2008. the tutorial is using the same thing. Is there away to get this or an alternative ??

This is my screen alt text

This is tutorials screen alt text

Upvotes: 16

Views: 21888

Answers (5)

Jacek Góraj
Jacek Góraj

Reputation: 1023

Solution to my problem was trivial. If you have any .cpp files and still these options are not visible for you, you are clicking properties for wrong thing.

Whilst you are clicking on Properties of Solution '<your_project_name>' you should click one line lower where it is only <your_project_name>.

Upvotes: 1

Lake
Lake

Reputation: 31

Or if you copied cpp files to a newly created project, you need to right click on the src folder and select "Include in Project", only then will visual studio consider them part of the project and show C++ in properties.

(If you don't see "src" in your project, make sure to toggle "show all files" in the Solution Explorer options.)

Upvotes: 0

Taehoon Kee
Taehoon Kee

Reputation: 51

I think I found a definitive solution, because I've seen so many cases ( when I grade my students' homework ). I've never made such a case on my own, but many of my students' homework appeared to have that case of missing c/c++ category. In those cases, build succeeded but executables not generated. Adding new c source file to the project will display the c/c++ category, but if you remove the source file from the project, then c/c++ category will go away again. It was not .vcxproj file problem. I think for some reason, VS failed to recognize the source as a c source file.

So, my solution is; Select the source file of the project in solution explorer, then right click to select the property of the c source file. Then select 'Item Type' to 'C/C++ compiler'. Then c/c++ category will appear.

enter image description here

Upvotes: 2

Jaya Surya
Jaya Surya

Reputation: 1

After adding .cpp file it may not show C/C++ in the project's properties. This is because value of "Configuration Type" is "Utility". Change this value to .dll and apply. Now you can see C/C++ in Configuration Properties. enter image description here

Upvotes: 0

Travis Gockel
Travis Gockel

Reputation: 27633

You don't have the C++ compiler options until you're actually using the C++ compiler. In this case, you don't have a .cpp file. So just add one and the compiler options will appear.

Upvotes: 35

Related Questions