question

Upvote
Accepted
588 8 13 16

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

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?

elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-apic++example
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
7.6k 15 6 9

@Jenny Johnson

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.

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


screenshot1.png (26.3 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

It worked just fine. The examples solution builds perfectly well now.

Thanks you very much for the help.

Upvotes

Or, if you don't want to install MFC, you can replace the line:

#include "afxres.h"

with:

#include<windows.h>

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea