Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

afxres.h -- error RC1015

Posted on 2014-01-27
5
Medium Priority
?
176 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 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

730 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