🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

I need help on a compiling error.

Started by
4 comments, last by Dragon2k1 22 years, 6 months ago
Hi, I need help on a compiling error. This is from Tutorial 1 from the "Tricks of the Windows Game Programming Gurus" book. I just added 3 files to a win32 application called "freakout". Those 3 files are the ones in the tutorial 1 folder on the cd. When I go to compile the project as an exe file, I get this error: ***************************** d:\source\t3dchap01\blackbox.h(34) : error C2146: syntax error : missing '';'' before identifier ''lpdd'' d:\source\t3dchap01\blackbox.h(34) : fatal error C1004: unexpected end of file found blackbox.cpp d:\source\t3dchap01\blackbox.h(34) : error C2146: syntax error : missing '';'' before identifier ''lpdd'' d:\source\t3dchap01\blackbox.h(34) : fatal error C1004: unexpected end of file found Error executing cl.exe. freakout.exe - 4 error(s), 0 warning(s) **************************************** Heres the line its on: extern LPDIRECTDRAW4 lpdd; // dd object Thanks in advance. Try not to rip on me too badly, im still new at this .
Advertisement
I don''t have the disks handy, but there are a few things that most people have problems with when working with their first DirectX tutorials.

Make sure you''ve done the following:

1) Install the DirectX SDK. If you haven''t done so, it''s probably included on the disks that came with the book. If not just get it at microsoft.com.

2) Add ddraw.lib and dxguid.lib to the project. To do so, select ''settings...'' from the project menu in VC++. on the dialog which pops up click the link tab. Add those two files to the end of the list in the ''Object/library modules'' text box.

Once that''s all done try to recompile again.
He''s right. And if I need a compiler error, drop me a line.

Kneelz

Hi, and thank you for the reply.

I did add both libraries, but I still receive the same error code. I have directx 8 installed, but the book was made during 7. Is most of Directx 8 not compatible with 7?

Hi, and thank you for the reply.

I did add both libraries, but I still receive the same error code. I have directx 8 installed, but the book was made during 7. Is most of Directx 8 not compatible with 7?
Each version of DirectX is fully compatible with previous versions. Did you install the DirectX SDK or just the runtime DirectX that most games install?

Either way, those errors are usually caused by classes, structures, typedefs, etc. in the header file that don't have a closing ';'.

check the header files and make sure everything is properly terminated with a ;

Edited by - B-Barlow on January 5, 2002 4:03:16 AM

This topic is closed to new replies.

Advertisement