can not find C/C++ in project properties
Asked Answered
R

5

16

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

Rivarivage answered 22/2, 2010 at 5:57 Comment(1)
Try adding a c++ source file (.cpp-file) and see if the menu appears.Necking
B
34

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.

Bobbobb answered 22/2, 2010 at 6:15 Comment(2)
Learn something new every day!Hamman
I am having a lot of c++ files still I see only Configuration Properties->General, Debugging, VC++ Directories, NMake. No C/C++, Linker, Manifest tool etc. BTW, it is a driver. Is it bcoz of that?Heresiarch
G
1

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

Gingrich answered 1/7, 2021 at 5:17 Comment(0)
L
0

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

Limonite answered 9/3, 2020 at 10:56 Comment(3)
Where do I change this?Senate
Under "Configuration Properties" I only have "Configuration"Senate
Visual Studio 2022: Configuration Properties — General — Project Defaults — Configuration TypeVilify
V
0

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.)

Variety answered 13/11, 2021 at 13:21 Comment(0)
M
0

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>.

Mucilaginous answered 19/5, 2024 at 13:34 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.