Archived

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

Anonymous Programmer

Help with Tricks :(

Recommended Posts

Hey, I get this error when I try to link the dx intializing demo (chap 6): main.obj : error LNK2001: unresolved external symbol _IID_IDirectDraw7 Debug/wnd.exe : fatal error LNK1120: 1 unresolved externals (it doesn''t like this code: if (FAILED(lpdd->QueryInterface(IID_IDirectDraw7, (LPVOID *)&lpdd7))) { // error return(0); } // end if ) Help would be appreciate.

Share this post


Link to post
Share on other sites
eldee    122
actually he did, its just in the chapter that everybody skips..
setting up the ide


-eldee
;another space monkey;

Share this post


Link to post
Share on other sites
Peon    276
I had the SAME problem lol If you ever have another error, try putting #define INITGUID or something weird like that at the top of your code I''m sure someone will correct me (that doesn''t look right)

Share this post


Link to post
Share on other sites
evaclear    166
Actually Lamothe uses the #define INIT_GUID instead of including dxguid.lib into the project. the #define INIT_GUID macro causes alot of problems when you divide your program up into seperate files, so I prefer to just link to the dxguid.lib . It is alot cleaner. Also keep in mind that dxguid.lib holds the Globaly Unique Identifiers for all of directx. So no matter what direct x component you use (direct draw, direct input, direct sound, direct play, direct show, direct 3d) you''ll need to include dxguid.lib into your project (just once).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
i find it easier to use the following when using andre''s source:

// Put at top of file...
#pragma comment( lib, "ddraw" ) // Include ddraw.lib in workspace (assuming you have properly setup the compiler links).
#pragme comment( lib, "dxguid" ) // ditto, but dxguid.lib does the same as #define ALLGUIDS

Share this post


Link to post
Share on other sites