VC2010 C++ error C1083: Cannot open include file: 'XXXXX.h': No such file or directory
2013-10-25 15:55
691 查看
第一次在VS2010上打开和创建VC++ MFC的项目。创建的空项目build时无法通过,抛出的错误是:
error C1083: Cannot open include file: 'stdio.h': No such file or directory
于是搜索了好多,查到这样的一片文章,解决了。
http://blog.csdn.net/carson2005/article/details/8589576
VS2010的VC工程仅配置一次lib和include以后再无需配置的方法
这两天刚装好VS2010试用,发觉VC10在Projecct Settings方面和以前不同了。
一个最大的不同是:VC Directory设置的位置和以前的版本不一样。VS2010之前,VC Directory的设置都是在IDE的Tools->Options中设置的;VS2010改为,分别在每个项目中的Properties中设置。如下图:
难道要每个项目都设置一遍常用的Include吗?答案是,不用。
在IDE中,打开View->Other Windows->Property Manager。展开树形后,你会发现一个名为“Microsoft.Cpp.Win32.user”的项目(如下图)。
右击并点击“Properties”后,你会看到一个和VC Project properties类似的属性设置框。
现在,你应该知道答案了吧。对,就是这里。只要将常用的Include都放入这里就可以达到你要的效果。
P.S.
在刚装好VS2010时,发现新建的项目都包含了机器上的STLport 5.1.2。找了一圈目录和文件,重装了好几次还是一样。后来才发现,原来VS2010不知道什么时候,将STLport的目录加到Microsoft.Cpp.Win32.user里了。修改后,重新打开项目就不再有STLport出现。
error C1083: Cannot open include file: 'stdio.h': No such file or directory
于是搜索了好多,查到这样的一片文章,解决了。
http://blog.csdn.net/carson2005/article/details/8589576
VS2010的VC工程仅配置一次lib和include以后再无需配置的方法
这两天刚装好VS2010试用,发觉VC10在Projecct Settings方面和以前不同了。
一个最大的不同是:VC Directory设置的位置和以前的版本不一样。VS2010之前,VC Directory的设置都是在IDE的Tools->Options中设置的;VS2010改为,分别在每个项目中的Properties中设置。如下图:
难道要每个项目都设置一遍常用的Include吗?答案是,不用。
在IDE中,打开View->Other Windows->Property Manager。展开树形后,你会发现一个名为“Microsoft.Cpp.Win32.user”的项目(如下图)。
右击并点击“Properties”后,你会看到一个和VC Project properties类似的属性设置框。
现在,你应该知道答案了吧。对,就是这里。只要将常用的Include都放入这里就可以达到你要的效果。
P.S.
在刚装好VS2010时,发现新建的项目都包含了机器上的STLport 5.1.2。找了一圈目录和文件,重装了好几次还是一样。后来才发现,原来VS2010不知道什么时候,将STLport的目录加到Microsoft.Cpp.Win32.user里了。修改后,重新打开项目就不再有STLport出现。
相关文章推荐
- OpenCV2.2+VC2005 fatal error C1083: Cannot open include file:'opencv2/core/core_c.h': No such file or directory
- 关于“fatal error C1083: Cannot open include file: 'StdAfx.h': No such file or directory”的问题
- 生成JNI的DLL时提示找不到jni.h的解决办法Cannot open include file: 'jni.h': No such file or directory
- 编译WINCE应用出现:Cannot open include file: 'ceconfig.h': No such file or directory
- error C1083: Cannot open include file: 'ntddk.h': No such file or directory
- C语言编译错误 fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
- fatal error C1083: Cannot open include file: 'stdlib': No such file or directory
- fatal error C1083: Cannot open include file: 'wdm.h': No such file or directory
- mysql-python 安装错误: Cannot open include file: 'config-win.h': No such file or directory
- 预编译头文件(precompiled header)及VC编译程序时Cannot open precompiled header file: 'Debug/.pch': No such file or directory
- fatal error C1083: Cannot open include file: 'avformat.h': No such file or directory
- VC编译程序时Cannot open precompiled header file: 'Debug/.pch': No such file or directory为什么
- Cannot open include file: 'ntddndis.h': No such file or directory
- VC编译程序时Cannot open precompiled header file: 'Debug/.pch': No such file or directory错误处理
- fatal error C1083: Cannot open include file: 'SDKDDKVer.h': No such file or directory
- fatal error C1083: Cannot open include file: 'jni.h': No such file or directory
- fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
- fatal error C1083: Cannot open include file: 'pkfuncs.h': No such file or directory
- fatal error C1083: Cannot open include file: 'dshow.h': No such file or directory
- 生成JNI的DLL时提示找不到jni.h的解决办法Cannot open include file: 'jni.h': No such file or directory