Solution to Error RC1015: cannot open include file ‘afxres.h’

I have experienced problem with VS2008 Express edition to compile a program written with VS2008 Professional on another machine today. The error message is Error RC1015: cannot open include file ‘afxres.h’.
The solution is figured out after searching from Google and my analysis :). The file afxres.h is located at C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include directory, while VS2008 Express edition doesn’t have support for atlmfc library. Copy files afxres.h and winres.h from that directory on the machine with Visual Studio 2008 Professional edition  and place them under the solution root then we can make VS2008 Express edition able to compile the project!

Leave a Reply