Advertisement

Tricks for the Windows Game Programming Guru, Help!

Started by October 11, 2001 01:30 PM
7 comments, last by WizzardUK 23 years, 2 months ago
I have just got a copy of Andre LaMothe''s book and wanted to get straight into it. I have read Chapter 1 and want to try out the FREAKOUT game. I loaded the files into Visual C++ as it said in the book but when I compile it I get an error (2 actually) telling me there should be a ; before an identifier. The exact errors are: blackbox.h(33) : error C2146: syntax error : missing '';'' before identifier ''lpdd'' blackbox.h(33) : fatal error C1004: unexpected end of file found Line 33 of blackbox.h is: extern LPDIRECTDRAW4 lpdd; // dd object I have added the library files to the list under the ''Link'' tad in ''Settings'', although some of the libraries (DSOUND3D.LIB and DMUSIC.LIB) I can not find. They are not installed using the SDK installer. I assume the problem is a setting with Visual C++, but I have no idea where to look. If anyone has the book or knows what I am doing wrong I would appreciate any help. Cheers Wizzard
Did you set the lib and include folders in MSVC++ too?

Tools->Options: pic Directories tab and add the sdk folders that contain the lib and the include files accordingly (make sure you float these new folders to the top of the list

Edited by - xtrmntr on October 11, 2001 2:39:28 PM
Advertisement
Have a look at nexe.gamedev.net/tutorials/ViewTutorial.asp?tutorialfile=Pages/Tutorial1.myxml. Especially the point concerning the setup of the include directories. I think that could cause your troubles.

Oh, I've been too slow

Edited by - VolkerG on October 11, 2001 2:42:03 PM
Cheers guys,that worked.

Although NOW I can''t link it because of the DSOUND3D.LIB doesn''t
exist.

Why wasn''t the file extracted when I installed the SDK (it''s the one off the CD that came with the book)?
Where can I get the individual file from and can I just copy that file into the lib directory?

Wizzard
WOW! are you using the SDK from the book! thats prehistory now
the sdk there is directx 6, we are 4 versions ahead now (dx7,dx7a,dx8,dx8a)

even though you should be able to compile with dx6 (because the sample was written with that version) perhaps you might want to download one of the new versions and try again, they are backward compatible (although DX8 doesnt have the dx7 docs) so this might help you getting dsound3d, as an alternative, you might want to browse the sdk disk and look for the lib, so you can manually copy it, the installer I believe is some sort of self extracting zip, so you might be able to unzip it, and look for the file if it does not come already unziped.

Hope it helps.
I downloaded the 8.0a SDK (all 150Mb of it) but I didnt know if it would be compatible (now I know different!) I have installed 8.0a on my other PC but still no DSOUND3D.LIB or DMUSIC.LIB.

Browsing the CD doesn''t help either. The files I want aren''t on the CD (the installer just copies the files, it doesnt extract them).

Can I just copy these files (when I find them!) into my LIB directory?
Can anyone send me them?

Wizzard
Advertisement
If you read the help file which comes with the direct x 8.0 SDK it will inform you which libraries are needed for the different sections of the API. Direct Music has never been made up of one library so the reason you can''t find dmusic.lib is because it doesn''t exist. It never has. Other libraries such as striimds.lib, and quartz.lib are used instead. Check the docs to find out which headers and lib files are needed for specific components of direct x. As for the DSound3d.lib I''m not quite sure if this ever existed either. But if it did, it was integrated into the regular dsound.lib with the DirectX 8.0 release.
Joseph FernaldSoftware EngineerRed Storm Entertainment.------------------------The opinions expressed are that of the person postingand not that of Red Storm Entertainment.
They have NEVER existed?

I can''t understand why Andre LaMothe refers to both in his book then. The program does not link because it says it needs DSOUND3D.LIB

If they don''t exist, how do I get around the problem of Visual C++ asking for them?

Wizzard
I have got it working now,
I removed dsound3d.lib and dmusic.lib from the link tab area in project settings and it''s all working.

Thanks everyone who helped,
I will buy you all a drink!

Cheers
Wizzard

This topic is closed to new replies.

Advertisement