Newbie DirectX Initialization Question

Started by
17 comments, last by Fredric 23 years, 11 months ago
Do what Armitage said and then verify that LPDIRECTDRAW4 exists within the header file. Before you verify, do a clean under build on the menu. Any new changes to your settings should be reflected.

Also, are you still getting the error, unexpected end of file? If so, you might need to add #include "stdafx.h" to the top of your program. It depends upon what type of project you choose to create.
Advertisement
To use the linker and add different libraries to the app I got to Project->Settings and then the LINK Tab. I then type in the .lib I want to use. At the moment, I have all the other stuff that the liner links as the default, but I have added ddraw.lib as well as dxguid.lib

So what am I doing wrong?

edit: I have tried a LOT of header files.. like, seriously, over 12 and stdafx or whatever the one you used was one of them. This is very frustrating...

GO LEAFS GO!

Edited by - Fredric on 5/2/00 6:31:46 PM

Edited by - Fredric on 5/2/00 6:34:12 PM
3D Math- The type of mathematics that'll put hair on your chest!
You are using the DX6 or greater SDK aren't you?

But also from the code you posted the includes should use
angled brackets instead of single quotes.
Also you have still got lpdd4 as LPDIRECTDRAW instead of LPDIRECTDRAW4.

After I changed both of these things the code compiled perfectly on my computer (MSVC6.0, DXSDK 7.0).

Edited by - JonHobson on 5/2/00 8:06:26 PM
---------- JonHobson ----------

You might try #define INITGUID but that should have the same effect as linking in dxguid.lib, but try it anyway. Also, as other people said, make sure that the header folder of the SDK is before everything else in the options dialog, and take those includes out of single quotes and put them into brackets.

Visit our web site:
Asylum Entertainment
My Geekcode: "GCS d s: a14 C++$ P+(++) L+ E-- W+++$ K- w++(+++) O---- M-- Y-- PGP- t XR- tv+ b++ DI+(+++) D- G e* h!"Decode my geekcode!Geekcode.com
Visit our web site:Asylum Entertainment
Grrr, the reason the includes are in single quotes is for the obvious reason that these boards support HTML, thus, if I put them in brackets- they don''t show up!

GO LEAFS GO!
3D Math- The type of mathematics that'll put hair on your chest!
did you change the default directory search order for your include and libs? this is the same thing armitage stated, but when i first read his post, i thought he meant move the include stmts to the top (which didn''t make sense).

msvc 6 comes with dx3 or something, whose headers and libs are mixed in with the standard vc includes and libs, and when you install the sdk, you need to go to Tools->Options->Directories and move the "c:\mssdk\include" (or whatever you have) above the vc include directory so it looks in the "new" dx include dir. same with the library search folder.

if you''ve already done that, i''m not sure what else could be done.



crazy166
some people think i'm crazy, some people know it
Alright... here''s what I''m going to do..

seeing as I can''t get the DDraw version 4 to work, I''ll just use the default lpdd (which is either 1.0 or is the default ddraw interface thingy. I''m a technical guy, can ya tell?). Anyhow, thanks for all the help! I''ll be posting more because I''ll be learning DX over the next few months- just giving you all something to look forward to! yah right!

GO LEAFS GO!
3D Math- The type of mathematics that'll put hair on your chest!
Why don''t you send someone you basic project file along with relevant source and headers.
They can try it on thier machine.
This will narrow it down to your code vs. your compiler settings. (I''m guessing it''s the compiler settings.)

I had that problem but then i simply added

#define INITGUID
remember put this at the top of the document. And only ever declare it once. It should work then.

-David
" The fastest code is the code you don't call "

This topic is closed to new replies.

Advertisement