error RC1015: cannot open include file 'afxres.h'. 的解决办法
生活随笔
收集整理的這篇文章主要介紹了
error RC1015: cannot open include file 'afxres.h'. 的解决办法
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
編譯工程時出現如下錯誤:
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'. 的解决办法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Windows7无法自动将IP协议堆栈绑
- 下一篇: \V110\Microsoft.CppC