Solved

afxres.h -- error RC1015

Posted on 2014-01-27
5
163 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 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 34

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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

617 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