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

Bondy_Bo
Bondy_Bo Contributor

I just downloaded the Elektron SDK 1.0.6 for C++ and I’m
trying to build the packages examples. When I load and build the solution (Elektron-SDK1.0.6.win\Ema\Examples\Training\Training_VS140.sln)
with my Visual Studio 2015, I get the following error:

5>Ema.rc(9): fatal error RC1015:
cannot open include file 'afxres.h'.

Why do I have this error? Can you please help me?

Best Answer

  • @Bondy_Bo

    The error seems to generate from ema project because it requires the header file from MFC. As far as I understand, visual studio 2015 default setup does not install Visual C++ MFC package. Therefore you need to modify the Visual Studio 2015 setup and add the MFC .

    Please close VS2015 and goto Control Panel->Programs and Features->Microsoft Visual Studio <Professional/Enterprise>->Change->Modify->Add Microsoft Foundation Classes.

    image

    Then re-open visual studio 2015 and re-build the solution.

Answers