Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

afxres.h -- error RC1015

Posted on 2014-01-27
5
Medium Priority
?
195 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 2000 total points
ID: 39813177
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
ID: 39813203
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 35

Expert Comment

by:sarabande
ID: 39814973
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
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 be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses
Course of the Month10 days, 12 hours left to enroll

885 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