[Fixed] VS 2012 – Fatal error RC1015: cannot open include file ‘afxres.h’

RC1015 cannot open include file afxres h

Usually when you are going to use VS 2012 instead of VS2010 sometime you may get this error: Fatal error RC1015: cannot open include file 'afxres.h'

Of course this error appear often when you don’t install full VS2012 version and you custom the installation but there is not a problem because it can be solved too.

Causes of cannot open include file ‘afxres.h’ error:

– when you try to open and VS2010 project with Vc 2012;

– you have made a custom installation of VS 2012;

– you have not installed Microsoft Foundation Classes for C++;

 How to solve RC1015 error:

Attention:  This method work only on VS 2012 Professional and will NOT work on Express edition. However if you are using Express Edition you should found this useful:

This header is a part of the MFC Library. VS Express edition doesn’t contain MFC. If your project doesn’t use MFC you can safely replace afxres.h with windows.h in your terrain2.rc.

As you can see on stackoverflow : http://stackoverflow.com/questions/3566018/cannot-open-include-file-afxres-h-in-vc2010-express/17454415#17454415

To solve Fatal error RC1015: cannot open include file 'afxres.h' on VS2012 Professional you should install Microsoft Foundation Classes for C++ because it is missing.

You can done that by downloading the installer of the VS2012 Professional, mount the image (if necessary) and the open it.

Click on “Modify” button then:

microsoft vs 2012 error can not include afxres h error foundation classes

Check “Microsoft Foundation Classes for C++” and then click “Update”.

That is all now you will not more get this error.

Conclusions

You know now how to fix “Fatal error RC1015: cannot open include file ‘afxres.h’ ” and causes of this VS2012 error and how to solve it on VS2012.

Please comment if I should add a tutorial to solve it on MFC projects with VS Express Edition.

Related posts:

Got something to say? Go for it!