Sign in to follow this  

Error when trying to Playsound()

This topic is 4665 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

------ Build started: Project: Henway, Configuration: Release Win32 ------ Compiling resources... .\Resource.h(26) : fatal error RC1004: unexpected end of file found Build log was saved at "file://c:\Documents and Settings\TOM WOULD GO\Desktop\cbook_tygp24_code\VCPP\Chap12\Henway\Release\BuildLog.htm" Henway - 1 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== Ok. Everything should work. It's not the wav because I used one from the example and it doesn't work. I did everything the book does. (Gave it an ID, defined it, and made sure everything matched)

Share this post


Link to post
Share on other sites
//-----------------------------------------------------------------
// Henway Resource Identifiers
// C++ Header - Resource.h
//-----------------------------------------------------------------

//-----------------------------------------------------------------
// Icons Range : 1000 - 1999
//-----------------------------------------------------------------
#define IDI_HENWAY 1000
#define IDI_HENWAY_SM 1001

//-----------------------------------------------------------------
// Bitmaps Range : 2000 - 2999
//-----------------------------------------------------------------
#define IDB_HIGHWAY 2000
#define IDB_CHICKEN 2001
#define IDB_CAR1 2002
#define IDB_CAR2 2003
#define IDB_CAR3 2004
#define IDB_CAR4 2005
#define IDB_CHICKENHEAD 2006

//----------------------------------------------------------------
// WAVES Range : 3000 - 3999
//----------------------------------------------------------------
#define IDW_CAPTAINJACK 3000

Share this post


Link to post
Share on other sites
Quote:
Original post by SeVReR
------ Build started: Project: Henway, Configuration: Release Win32 ------
Compiling resources...
.\Resource.h(26) : fatal error RC1004: unexpected end of file found
Build log was saved at "file://c:\Documents and Settings\TOM WOULD GO\Desktop\cbook_tygp24_code\VCPP\Chap12\Henway\Release\BuildLog.htm"
Henway - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========




By the looks of the error message your missing a token somewhere, as the compiler is reaching the end of the file but is still looking for something.

Is what you posted the complete resource.h?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Try adding an empty line in the end of resource.h

Share this post


Link to post
Share on other sites
From www.microsoft.com:

"The resource compiler generates the following errors when the .RC file includes a .H file whose last line is a define (that is, there was no final carriage return at the end of the #define statement):
fatal error RC1004: unexpected EOF"

Link to the article

\Jimmy H

Share this post


Link to post
Share on other sites

This topic is 4665 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