• Popular Now

• 15
• 15
• 11
• 9
• 10

Archived

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

Fresh Meat - problems early on

This topic is 5247 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

I am trying to set up DirectDraw in a shell win32 application. I have included ddraw.h and added ddraw.lib to my project. All I have written, besides the code that sets up the window, is:
LPDIRECTDRAW7 lpdd7 = NULL;
if(FAILED(DirectDrawCreateEx(NULL,(LPVOID *)&lpdd7,IID_IDirectDraw7,NULL))) PostQuitMessage(0);
followed by a game loop (with no code in it yet). I get no errors when I compile, but I get this error upon building:
Linking...
main.obj : error LNK2001: unresolved external symbol _IID_IDirectDraw7
Debug/Shell.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
I can''t figure out what''s wrong. I have the latest version of DirectX and everything. I''m using MSVC++ 6, by the way.

Share on other sites
Link against the DirectX libraries. Including the headers just gives the compiler a bunch of prototypes and definitions, not actual code.

Share on other sites
quote:
Original post by Anonymous Poster
Link against the DirectX libraries. Including the headers just gives the compiler a bunch of prototypes and definitions, not actual code.

What do you mean by "Link against?" I have added them to my project... do I need to do something more?