简体   繁体   English

不能在visual studio 2008中包含std头文件

[英]Cannot include std header file in visual studio 2008

I am new to c++ programming, 我是c ++编程的新手,

I have a c++ project developed in visual studio 2010, and now I am developping a COM project in VS2008. 我有一个在visual studio 2010中开发的c ++项目,现在我正在VS2008中开发一个COM项目。 In this project I have to include some files used in the c++ project (developed in VS2010). 在这个项目中,我必须包含c ++项目中使用的一些文件(在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" . 当我试图包含来自C ++项目(在VS2010中开发)的头文件时,编译器会给出错误"cannot find stdint.h file"

Is this problem with my installed visual studio? 这是我安装的Visual Studio的问题吗?

The stdint.h file is only available with vs2010 and not with vs2008. stdint.h文件仅适用于vs2010而不适用于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. 作为临时解决方案,您可以从已安装的visual studio 2010的include文件夹(c:\\ ProgramFiles \\ VS \\ include \\ stdint.h)复制stdint.h文件,并将其添加到2008项目中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM