Link error in Direct X 7

Started by
5 comments, last by acw83 24 years, 3 months ago
error LNK2001: unresolved external symbol _IID_IDirectDraw7 That''s what I get, any suggestions? I made sure that the directories to the header files and the library files were at the top of the list in VC++ 6. Thanks.
Advertisement
Don''t know if this will help you or not but here goes, make sure that you added the files to your project:

Do it by Add to Project\Files option
or
List them in the Project\Settings\Link tab in the Obj/Lib modules string.

(And if you have already done that, try cleaning the project, it goes south every once and a while as well)

~deadlinegrunt

Wow- I had this exact problem several months ago when I started using DirectX, in Borland, but I think the solution should be the same.

You should just add the dxguid.lib file, and whatever specific libraries you want to use (ddraw.lib, dinput.lib, etc...) to your project. I don''t know how to do it in VC++, but for borland (in case there is a parallel) you add them as nodes to the ide,

hope this helps, -Fnj

---
Incompetence is a double edged banana
---
--- Incompetence is a double edged banana---
Yeah, Fnjord is right, i just fixed this like a couple days ago, my book did not tell me to include dxguid.h, and thats what screwed me over so much. You get that error, because the program looks for the InterfaceID for LPDIRECTDRAW7,(or any other revision for that matter) which is present in dxguid.lib, and can only find it when you have the lib linked.

Nomad
I included dxguid.lib and all is well, but do I need dxguid.h as well? Thanks for your input.
I don''t think there is a dxguid.h, in any case I''ve never included it- just adding the libraries to the project worked for me. (well ddraw.h and it''s library go together, but dxguid has no coresponding header)
--- Incompetence is a double edged banana---
quote: Original post by acw83

I included dxguid.lib and all is well, but do I need dxguid.h as well? Thanks for your input.


The purpose of dxguid.lib is for the QueryInterface method of determining Globally Unique IDentifiers and whether a com object supports the interface your seeking. The reason for including dxguid.lib is to supply the linker the necessary mappings to these objects. (in a nutshell)

So to sum this up:

Either define INITGUID before you include or define any com objects (Also make note that you should only do this in only one of your source modules)
OR
just include the dxguid.lib in your project.

Hope this helps shed some light on the issue...

--another bit pusher

Edited by - deadlinegrunt on 1/7/00 1:26:30 PM

~deadlinegrunt

This topic is closed to new replies.

Advertisement