cannot open include file 'afxres.h'错误的一种解决方法
来源:互联网 发布:百度云盘加载数据失败 编辑:程序博客网 时间:2024/05/19 18:11
接了一个视频监控的开发,按海康SDK开发用户的需求。
从网上下载了海康的SDK,开发SDK,当然要看看它的DEMO啦,主要的内容是用VC++写的。
在DEMO的文件夹里,发现了一个sln文件和一个dsw文件,这分别是VS.NET的解决方案文件和VS6以前版本的工作空间文件。
我的电脑上安装的是VS6和VS2010 sp1。
先用VC6打开dsw文件,加载的速度较慢,等待一段时间后,发现资源文件无法打开,提示“fatal error RC1015: cannot open include file 'afxres.h'”。
搜索了一下这个问题,都是说文件找不到,放到指定的文件夹下就可以的。
但是我查找了一个这个文件,电脑上是存在这个文件的,路径分别是:
VC98\MFC\INCLUDE 对应VC6
Microsoft Visual Studio10.0\VC\atlmfc\include 对应VS2010
而且项目设置的包含路径里已经指定了对应的路径,所以,很明显不是缺少文件或路径设置的原因。
那再换VS2010试试吧。
用记事本打开sln文件看
# Visual Studio 2013
VisualStudioVersion = 12.0.40629.0
MinimumVisualStudioVersion = 10.0.40219.1
这项目DEMO是用VS2013写的,最低要求是VS2010。
用VS2010打开项目,加载速度比VS6快很多。再打开资源文件,仍然报错:“fatal errorRC1015: cannot open include file 'afxres.h'”。看来这个根本不是文件或路径问题。
还是把项目生成一次吧,可能是缺少一些必要的文件。
生成项目又报错了:错误 1 error MSB8008: 指定的平台工具集(v120)未安装或无效。请确保选择受支持的 PlatformToolset 值。
再到网上搜索,找到了解决方式:这是由于用低版本VS打开高版本VS创建的项目出现的问题,很简单。步骤如下:
1.选择项目,注意是项目,不是解决方案。我在这里卡了一会儿,选择到解决方案上时,是不会出现下面的内容的;
2.右击->属性->配置属性->常规->平台工具集
3.选择v100.
OK,再次生成项目,成功通过!
再次打开资源文件,成功打开!
问题解决!
提示“fatal error RC1015: cannot open include file 'afxres.h'”,原来编译一下项目就可解决!
- cannot open include file 'afxres.h'错误的一种解决方法
- fatal error RC1015: cannot open include file ‘afxres.h’ 的一种解决方法
- cannot open include file"afxres.h" 的解答
- error RC1015: cannot open include file 'afxres.h'
- error RC1015: cannot open include file 'afxres.h' 解决办法
- VS2008(SP1)资源编译错误:fatal error RC1015: cannot open include file 'afxres.h'.
- Cannot open include file: 'iostream.h'错误解决方法
- Cannot open include file: 'd3dx9.h' 错误
- fatal error RC1015: cannot open include file 'afxres.h'.该如何解决?
- vc++提示cannot open include file 'afxres.h'———VC安装设置问题
- 编译总是出错:fatal error RC1015: cannot open include file 'afxres.h'.
- C++中提示fatal error RC1015:cannot open include file 'afxres.h'
- VS2017 报错 fatal error RC1015: cannot open include file 'afxres.h'.
- Cannot open include file: 'usb100.h': No such file [解决方法]
- fatal error C1083: Cannot open include file: 'iostream.h'错误解决方法
- fatal error C1083: Cannot open include file: 'iostream.h'错误解决方法
- Microsoft Visual C++ 6.0 (SP6) 中can not open include file "afxres.h"问题的解决方案
- fatal error C1083 Cannot open include file 'iostream.h' No such file or directory 的解决方法
- 网狐6603、客户端创建房间、会陪分配到其他客户端已创建好的房间去
- Java static修饰初始块{}
- 19.[个人]C++线程入门到进阶(19)----线程函数:ResumeThread
- Spring入门学习——第二阶段总结图
- 图片管理器
- cannot open include file 'afxres.h'错误的一种解决方法
- 20.[个人]C++线程入门到进阶(20)----线程函数:OpenThread
- C#实现闪动托盘图标效果的方法
- 140.Fragment实现程序锁未加锁模块
- 进制转换
- 读书笔记《Effective C++》条款03:尽可能使用const
- myeclipse的problem报错,工程出现了一个感叹号
- easyui datagrid combobox多选第一个时最前面会多加“,”逗号
- leetcode 13. Roman to Integer