Archived

This topic is now archived and is closed to further replies.

Squeejee

Someone tell me how to include that dx lib file again?

Recommended Posts

Yep, its that question again. I need to include that dx .lib file again so my dx program will work. Whats that file called, Dxguid.lib or something? And how do I add it into VC++ 6.0?

Share this post


Link to post
Share on other sites
Sure, no problem! Project->Settings (or ALT + F7). Go to the "LINK" tab and where it said "Object/Library modules", in the beggining of the list write the name of the library you need to include.

Share this post


Link to post
Share on other sites
Ok, thanks, I got ddraw.h ddraw.lib and dxguid.lib included. But it gives me these errors:

error C2146: syntax error : missing ';' before identifier 'lpdd4'
error C2501: 'LPDIRECTDRAW4' : missing storage-class or type specifiers
fatal error C1004: unexpected end of file found

this is the code at that like:

      
LPDIRECTDRAW lpdd = NULL; // Standard DirectDraw 1.0

LPDIRECTDRAW4 lpdd4 = NULL; // DirectDraw 6.0 interface 4 <---ERROR LINE---<<

LPDIRECTDRAWSURFACE4 lpddsprimary = NULL; // Pointer to hold primary surface

LPDIRECTDRAWPALETTE lpddpal = NULL; // Main palette



Edited by - Squeejee on February 16, 2002 12:02:39 PM

Edited by - Squeejee on February 16, 2002 12:09:36 PM

Share this post


Link to post
Share on other sites
where did u get this code from?a book? anyway i think that instead of LPDIRECTDRAW4 it should be LPDIRECTDRAWOBJECT thats how it is in my code, and it works, but im using DX8 so maybe its different

Share this post


Link to post
Share on other sites
Alternately, put this at the top of each file:

#pragma comment( lib, "dxguid.lib" )
#pragma comment( lib, "d3d8.lib" )

etc.

-----------------------------
The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.

Share this post


Link to post
Share on other sites
None of that worked. And I have ddraw.h included. The same code worked before, but I reformatted in reinstalled MSVC++ but it won't compile the project like it did before.

Edited by - Squeejee on February 16, 2002 2:52:35 PM

Share this post


Link to post
Share on other sites
Your include/lib directories must be set up correctly. Go here: Tools->Options->Directories. For "Include files", make sure

c:\DXSDK\include

or wherever you have it installed is the _first_ line in the list box, before

c:\program files\microsoft visual studio\vc98\include
or (which is what I have)
c:\MSDEV\vc98\include

The same should be done for "Library files".

Share this post


Link to post
Share on other sites
You have an old version of DirectX. I bet LPDIRECTDRAWSURFACE is defined, right? Just not LPDIRECTDRAWSURFACE4. Either that, or you have something like #define DIRECTDRAWVERSION 0x0300 or some such thing, which only includes the DirectDraw 3.0 stuff.

~CGameProgrammer( );

Share this post


Link to post
Share on other sites
No, LPDIRECTDRAWSURFACE4 lpddsprimary = NULL is defined. And I have nothing like #define DIRECTDRAWVERSION 0x0300 that defines a version of DirectDraw.

Share this post


Link to post
Share on other sites
quote:
Original post by Squeejee
Yeah, thats done. They are both first on the list. And I am using the vc++ ones, not the sdk.

er...you WANT the SDK ones - why microsoft even bothered to include a (relatively) rapidly updated SDK''s headers at all with MSVC is beyond me - but they did, and it was DX3.
quote:
No, LPDIRECTDRAWSURFACE4 lpddsprimary = NULL is defined.

From the error message, LPDIRECTDRAWSURFACE4 is NOT defined, which is the problem you''re having (probably because of the first part of this message). If you''re going to ask for help, stop being so stubborn and abrasive.

-scott

Share this post


Link to post
Share on other sites
Yeah, I dled it once, but I reformatted and just reinstalled VC++ and did't get around to getting the SDK because I got a 56k and I'm lazy. Ill go dl it.

Edited by - Squeejee on February 16, 2002 7:25:25 PM

Share this post


Link to post
Share on other sites