Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot include std header file in visual studio 2008

I am new to c++ programming,

I have a c++ project developed in visual studio 2010, and now I am developping a COM project in VS2008. In this project I have to include some files used in the c++ project (developed in VS2010).

When I tried to include a header file from the C++ project (developed in VS2010), the compiler gives error "cannot find stdint.h file".

Is this problem with my installed visual studio?

like image 723
goldenptr Avatar asked Mar 15 '12 13:03

goldenptr


People also ask

How do I add a header to a Visual Studio project?

Place your caret on the first line of any C# or Visual Basic file. Press Ctrl +. to trigger the Quick Actions and Refactorings menu. Select Add file header. To apply the file header to an entire project or solution, select Project or Solution under the Fix all occurrences in: option.

How do I fix a file header in Visual Studio Code?

Press Ctrl +. to trigger the Quick Actions and Refactorings menu. Select Add file header. To apply the file header to an entire project or solution, select Project or Solution under the Fix all occurrences in: option. The Fix all occurrences dialog will open where you can preview the changes.

How do I add a header in EditorConfig?

Add the following rule to your EditorConfig file: file_header_template. Set the value of the rule to equal the header text you would like applied. You can use {fileName} as a placeholder for the file name.

How do I include a file header for copyright purposes?

Why: Your team requires you to include a file header for copyright purposes. Add an EditorConfig to a project or solution if you do not already have one. Add the following rule to your EditorConfig file: file_header_template. Set the value of the rule to equal the header text you would like applied.


1 Answers

The stdint.h file is only available with vs2010 and not with vs2008. As a temporary solution you can copy the stdint.h file from include folder of an installed visual studio 2010, (c:\ProgramFiles\VS\include\stdint.h) and add that to your 2008 project.

like image 172
Aneesh Narayanan Avatar answered Sep 18 '22 02:09

Aneesh Narayanan