开发者

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 开发者_Python百科Edition 2008. the tutorial is using the same thing. Is there away to get this or an alternative ??

This is my screen

can not find C/C++ in project properties

This is tutorials screen

can not find C/C++ in project properties


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.


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.

can not find C/C++ in project properties


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.

can not find C/C++ in project properties


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜