编译工程时出现如下错误:

error RC1015: cannot open include file 'afxres.h'.

‘afxres.h’ 文件是跟MFC相关的,出现此种错误有两种解决办法:

方法1:

项目->属性->VC++目录->包含目录,添加D:\VS\VS2012\VC\atlmfc\include,如图所示添加的路径为vs安装路径\VC\atlmfc\include,正确添加如下图所示,重新编译工程,即可成功。

方法2:

1.进入VS的维护模式,把MFC给装上。蛮费时间的。(不推荐)

2.如果你的代码根本就没用到MFC,那么,简单地把你资源文件中的

#include "afxres.h"  改为

#include <Windows.h>
         #include <winres.h>

如图下所示,重新编译工程,即可成功。

参考链接:

https://stackoverflow.com/questions/3566018/cannot-open-include-file-afxres-h-in-vc2010-express

error RC1015: cannot open include file 'afxres.h'. 的解决办法相关推荐

  1. VS2008(SP1)资源编译错误:fatal error RC1015: cannot open include file 'afxres.h'.

    只要一改动资源,按F7编译就会出现两个错误: error RC2001: newline in constant fatal error RC1015: cannot open include fil ...

  2. error RC1015: cannot open include file 'sal.h'.

    windows驱动开发出现如下错误: 1>errors in directory xxx/xxx/xxx 1>e:\winddk\7600\inc\api\specstrings.h(11 ...

  3. fatal error C1083: Cannot open include file: 'uxtheme.h'的解决

    最近做一个系统时,苦于界面比较难看,如果自己从头做起的话,过于烦琐,便上网,寻找合适的界面库,找了多个,发现了一个比较合适的界面库GuiLib(官方网址:www.beyondata.com),这个界面 ...

  4. vs2019 MFC 中 cannot open include file 'afxres.h' 问题解决方法

    vs2019 MFC 中 cannot open include file 'afxres.h' 问题解决方法 使用Everything查找afxres.h文件,如果没有everything的,可以到 ...

  5. _mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h':no such file or directory

    Window7下使用"pip"安装"MySQL-python"提示错误:_mysql.c(42) : fatal error C1083: Cannot ope ...

  6. mfc中的.rc和.rc2出错fatal error RC1015: cannot open include file 'res\ModalD

    fatal error RC1015: cannot open include file 'res\ModalDlg_MFC.rc2'. 今天学习windows编程,照着书上改着改着不知道怎么改的出来 ...

  7. fatal error C1083: Cannot open include file: 'iostream.h': No such file or dire

    错误: fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory 我的源代码测试回调函数 ...

  8. dcmtk 3.6.0 error C1083: Cannot open include file: 'iostream.h' 解决办法

    2011年1月6日发布的dcmtk 3.6.0版本在编译完毕后, 用自己工程调用dcmdata.lib的过程中发现一个这样的错误: "error C1083: Cannot open inc ...

  9. MySQLdb/_mysql.c(29) : fatal error C1083: Cannot open include file: ‘mysql.h‘: No such file or direc

    环境:64位Windows10系统,python2.7.15 问题:安装pip install mysqlclient时报错MySQLdb/_mysql.c(29) : fatal error C10 ...

最新文章

  1. 粗虚线和细虚线_建筑图纸的细线,粗线,虚线表示什么
  2. [Markdown语法][快速入门][CSDN]
  3. stn算子_深度学习常用算子(二)
  4. 力扣69. x 的平方根
  5. 【NOIP2009】【codevs1174】靶形数独
  6. 十年软件开发经验小结
  7. 高亮显示不区分大小写的关键字——ASP
  8. linux和unix的关系
  9. t470键盘拆解_ThinkPad T470拆机图赏:堪称商务本的业界标杆
  10. 谷歌浏览器屏蔽广告插件下载
  11. import * as x from 'xx' 和 import x from 'xx'
  12. 计算机表格用计算公式百分百,计算机表格怎么算所占比例 - 卡饭网
  13. windbg 常用调试命令总结
  14. mysql 字段 decimals_[转]分析MySQL数据类型的长度【mysql数据字段 中length和decimals的作用!熟悉mysql必看】...
  15. 【GD32F310开发板试用】编码器接口的使用
  16. 开源BBS论坛软件推荐
  17. 电脑硬盘突然不见了?详细解决方法分享
  18. 有未经处理的异常 0xC00000FD Stack overflow (参数: 0x00000000, 0x00842000)
  19. 带你薅“云”羊毛:定个小目标,先薅他一年
  20. 关于计算机网络各层协议

热门文章

  1. 0x开头的颜色值和#开头的颜色值的区别以及转化
  2. div css 常用技巧
  3. 【网络流24题】飞行员配对方案问题
  4. django系列 1 :python+django环境搭建 +mac提示找不到manage.py命令
  5. (multi)set的某些操作
  6. 微型计算机中常用的进位计数制有,计算机试题与答案
  7. VueJs开发笔记—IDE选择和优化、框架特性、数据调用、路由选项及使用
  8. Oracle开发:normal ,sysdba,sysoper区别
  9. ionic中的后退方法
  10. DP UVALive 6506 Padovan Sequence