Skip to main content
GameDev.net gamedev.net
🔒 Locked

IID_IDirectDraw4 error

Started by RoTTer Feb 18, 2000 at 10:55 PM 3 replies 900+ views
Original Post
RoTTer
RoTTer
Hello I was working on my first DX (DX version 6, btw) program (cant call it a game yet hehe), and it was working fine. Then I turned computer off, and came back a couple hours later, changed a couple lines on the code (nothing big, like declaring a couple globals and retrieving the screen width/height with GetSystemMetrics and saving them to those vars), compiled it and it was working. Then when Linking I got the error : error LNK2001: unresolved external symbol _IID_IDirectDraw4 If I change the QueryInterface to IID_IDirectDraw (without the 4) it will give the same error (except it will change to _IID_IDirectDraw), so that isnt a mixed-version error, probably. Oh, and I even copied one of DD SDK examples source entirely and pasted over mine, then changed a couple things (like removed the #include "resource.h" and made the properly changes on code to not load stuff from it), and it will compile with no errors, and give the same error on Linking. The weird thing is that it was working today. And suddendly isnt anymore =/ The ddraw.lib is still there, so is the ddraw.h. And they arent corrupted. Thanks a lot for your time. Cya, -RoTTer
SiCrane
SiCrane
You did save your project setting and not your source code changes? The lib file you''re missing sounds like dxguid.lib. Don''t know why it might have disappeared otherwise.
RoTTer
RoTTer
Hello SiCrane!

Wow, it worked! Thanks a LOT! Waaa! =]

But I really didnt get it.
I had never included that lib you mentioned before, and it was working! Really! I dont get this!
But oh well, now it is working fine. I owe you one
But unfortunately Im newbie with this DX stuff, so I wont probably be able to help you with this ehhe =]

Thanks again for the help, that really made my code work. Wohoo =]

Cya,
-RoTTer
crouilla
crouilla
THANKS!!!!

OK, so I didn''t post this question, but I was two steps from going postal on damn Microsoft... I''ve installed the service pack for VC5, installed VC6, installed 3 versions of the SDK (7, 8, 8.1), renamed every ddraw.lib file on my system to make sure it wasn''t using the wrong one, and was STILL getting this damn error until I forced the link of dxguid.lib... The good news is that I''ll never forget that again (then again, I shouldn''t have to remember it to begin with, but that''s a moot point)

Thanks again!
-Chris
---<<>>--- Chris Rouillard Software Engineercrouilla@hotmail.com
RegistryHacker
RegistryHacker
You can use

#define INITGUID

at the start of your source code to fix that.
(Put it just before #include or something)

Simon
Simon

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.