Skip to main content
gamedev.net
🔒 Locked

TOTWGPG Problem

Started by Caijin Jul 2, 2000 at 3:12 PM 11 replies 1k views
Original Post
Caijin
Caijin
I bought tricks of the windows game programming gurus a couple of days ago and I come to the first program (FreakOut)and I include the ddraw.lib and ddraw.h, blackbox.cpp and blackbox.h. I try to compile freakout.cpp but it results in 2 errors both on the same line (blackbox.h 34) this line says: extern LPDIRECTDRAW4 lpdd; the first error is that it says I need a ; before lpdd and the second error says unexpected end of file found (on the same line) What am I doing wrong? I included the ddraw.h file like any other. I wasnt too sure how to include the .lib files so I went to project->settings->link and included ddraw.lib in the object/library modules line and i also included the DirectX SDK library directory in tools->options->directories->library files. Nothing has worked. Can someone please help me before I go crazy? Thanks for taking the time to read this and for any help offered
deadlinegrunt
deadlinegrunt
Project->Settings->C/C++->Category[C/C++]->Check NOT using precompiled headers.



YAP YFIO,
deadlinegrunt
~deadlinegrunt
deadlinegrunt
deadlinegrunt
quote:
Original post by Caijin

I included the ddraw.h file like any other. I wasnt too sure how to include the .lib files so I went to project->settings->link and included ddraw.lib in the object/library modules line and i also included the DirectX SDK library directory in
tools->options->directories->library files.
Nothing has worked.



By the way, I like how you made an effort on your own.

You are also going to need to link in the dxguid.lib as well.



YAP YFIO,
deadlinegrunt

Edited by - deadlinegrunt on July 2, 2000 4:43:30 PM
~deadlinegrunt
Caijin
Caijin
Thanks for the reply but it didn''t work. It comes up with the same 2 errors. Thanks though
NickGA
NickGA
might need to add the winmm.lib to the link..
"If you build it, it will crash."
NickGA
NickGA
quote:
Original post by NickGA

might need to add the winmm.lib to the link..



also you might try active settings to release.. or debug just to see if the other settings might work..

"If you build it, it will crash."
Caijin
Caijin
Thanks for the replies.
linking winmm.lib doesnt change anything and im don''t know what you mean by active settings to release. Also it wont let me debug because whenever I try it says the program hasnt been built would you like to build it, when i try to build it i get those errors.
Thanks
Ferinorius
Ferinorius
I think you have to actually include them in your project. Here is what I did to get it to work:

Project->Add to Project->Files...

then look for it in the mssdk or whereever it is and then hit ok. That happens to me a lot if i think that error is the same as the one I get.

Hope it works

Ferinorius
Ferinorius
Wait a minute..that ain''t the same error....I''ll keep looking, sorry for that utter waste of time
Caijin
Caijin
LOL No need to apologise I appreciate the effort. I had added all the .h (ddraw.h etc) to the project previously, in the way you describe, but that didnt help.
Thanks for the reply
Aldacron
Aldacron
You say you set the directory for the DX SDK include files. Make sure that you put that directory at the top of the list. Just highlight it and click the up arrow until it gets to the top, otherwise VC will find the old DX headers before it finds the new ones.
Caijin
Caijin
It Worked!!!
Thankyou so much. I am a very happy person now.
Thanks again

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.