Sign in to follow this  

Resources with VC++ 2005 beta

This topic is 4690 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. Im having a little problem when compiling if I try to use rc files in the beta of VC++ 2005 Express edition. Getting an error like this. Compiling resources... .\Resource.h(5) : fatal error RC1004: unexpected end of file found I think this is probibly because I need a resource editor/compiler. If thats the case could someone tell me of one I could dl and get working with VC++? If not here is my Resource.h. Maybe someone can tell me whats causing the error?
//-----------------------------------------------------
// Icons				Range : 1000 - 1999
//-----------------------------------------------------
#define IDI_SKELETON		1000
#define IDI_SKELETON_SM		1001


Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hi, I'm not sure if vc2005 supports resource files yet? If you have started a project in an old version then you can use the resource, but I don't think you can make. I don't have any evidence for this except I tried doing one but it wouldn't (or I couldn't).

Share this post


Link to post
Share on other sites
*sighs* Wish there was some way to get it to compile with resources. :/ My one book on game programing uses them quite reguarly. >_<

Share this post


Link to post
Share on other sites
OK, firstly VC++ 2005 Express definitely DOES allow resource files to be used - mine uses them without any problem. What it doesnt allow is for VISUAL creation of the file, but if you are writing it by hand that is fine.

Have you just for the resource.h file? Or do you also have a .rc file? Could you post the code for both please, and will try and help.

Ols

Share this post


Link to post
Share on other sites
I know this is somewhat... unrelated, but looking at your code,
are you reading the book 'Beggining Game Programming' by Michael Morrison, or perhaps the older edition, 'Teach Yourself Game Programming in 24 hours'?

Share this post


Link to post
Share on other sites
Acctualy I am. I got the 24 hours book cheap. Does that make a difference? Well anyway here be the code in the rc file.


//-----------------------------------------------------
// Include Files
//-----------------------------------------------------
#include "Resource.h"

//-----------------------------------------------------
// Icons
//-----------------------------------------------------
IDI_SKELETON ICON "Skeleton.ico"
IDI_SKELETON_SM ICON "Skeleton_sm.ico"






EDIT: Ive looked up the error and its something to do with not having line feed and carriage return characters? Oo And when I decide to add a line to my Resouce.h I get these errors instead.

Linking...
Skeleton.obj : error LNK2019: unresolved external symbol "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z) referenced in function _WinMain@16
LIBCMTD.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup
Debug/Chapter 2.exe : fatal error LNK1120: 2 unresolved externals

Share this post


Link to post
Share on other sites
You haven't defined a WndProc function. That's what that error is.

Quote:
Original post by Dko
Is there a reason I have to keep making topics over and over till I finnaly get an answer? >_< Did I do something wrong?


No, but that's getting dangerously close. Just be patient and you'll get help here :)

Share this post


Link to post
Share on other sites
Well I don't mean like every 5 minutes I make one. I mean more like every 24 hours because I might be given a few hints as to the problem and then I come back with new info and thats all I get.

Hemm... I thought I had made a WndProc

Share this post


Link to post
Share on other sites

This topic is 4690 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this