Jump to content
  • Advertisement
Sign in to follow this  
SeVReR

Error when trying to Playsound()

This topic is 4974 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
Advertisement
//-----------------------------------------------------------------
// 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
My call

PlaySound((LPCSTR)IDW_CAPTAINJACK, _hInstance, SND_ASYNC | SND_RESOURCE | SND_LOOP);

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
make sure all of your { have a } as well, i know VC++ 6.0 will give that error if you're missing a }.

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!