Solved

afxres.h -- error RC1015

Posted on 2014-01-27
5
135 Views
Last Modified: 2015-05-17
I am compiling code and getting the following error:

Error      1      error RC1015: cannot open include file 'afxres.h'.      C:\Program Files (x86)\EldoS\Callback File System\Samples\CPP\VDisk\VDisk.rc      10      1      VDisk

Please help---any ideas?
0
Comment
Question by:nymaestro
  • 2
5 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
Comment Utility
VC++ Express does not come with MFC, and 'afxres.h' belongs to the MFC library. Even worse, it's part of MFC's resources (thus the 'res'), and all Express versions come without a resource compiler and therefore no support for any resources embedded into projects. Try removing all resource entries - yet that will not guarantee that you will get the whole thing to run, esprecially when the resources contain UI elements.
0
 
LVL 86

Expert Comment

by:jkr
Comment Utility
Ooops, one idea to remedy the situation - get the resource compiler from the Platform SDK (pardon, nowadays the "Windows SDK"): http://www.microsoft.com/click/services/Redirect2.ashx?CR_EAC=300135395
This will still mean that you have to compile the resources manually, but hey...
0
 
LVL 32

Expert Comment

by:sarabande
Comment Utility
if the rc file includes "afxres.h" the sample project could be a mfc project which cannot be built without the mfc include folders and the mfc libraries (both import libraries and dll's).

the sdk will not include those files.

look at the ...\Samples\CPP\VDisk\VDisk.vxcproj with notepad (or visual studio text editor by using the 'edit with ...'). if the file does not exist, check if there is another *.vxcproj or *.vcproj file in the VDisk folder. the xml tree in this file should contain info which version of VC compiler is required and whether MFC is required.

I looked at EldDos faq and the failing afxres.h include seemed to be a known issue. some people replaced the afxres.h by winres.h and it compiled (with warnings you probably can ignore). I don't know whether the workaround could work for VDisk also, because the look-and-feel of the dialog presented at the web page is that of a mfc dialog what would mean you have to install at least the standard edition of the visual studio before you can build it.

Sara
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now