Archived

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

RickyPiller

IID_DirectDraw4???

Recommended Posts

RickyPiller    122
I trying to compile an example from "Tricks of The Windows Game Programming Gurus", and I get an error saying Linking... demo6_1.obj : error LNK2001: unresolved external symbol _IID_IDirectDraw4 Debug/Test.exe : fatal error LNK1120: 1 unresolved externals Why do I get this. I took the libs and headers from the books CD and placed them into my LIB and HEADER folder for MSVC++6.0. DDraw. She has double D''''s

Share this post


Link to post
Share on other sites
SmartRetard    122
You need to add the ddraw.lib file to your project itself.
Click Projects->Settings then click the Link tab. You should see a line of files. Go to the end of the list and add a space then ddraw.lib. That should solve your problem.

-- Are you not entertained?!?!

Share this post


Link to post
Share on other sites
Oluseyi    2103
Also make sure you set up your Directories correctly. If you installed headers/libs from the CD, go to Tools->Options...->Directories tab, select Includes (or is it headers?), add the path to your newly installed headers as the last item, then move it up the list, preferrably to the top. This last step is crucial because MSVC searches for headers in the order of the paths in that dialog, and there are older DirectX headers that come preinstalled.

Do the same for your Library files and you're good to go. Well, almost. For the various IIDs and GUIDs, you're going to need to either add dxguid.lib to your project or #define INITGUID before including any DirectX headers.

[Edit: formatting]

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! ]
Thanks to Kylotan for the idea!


[edited by - Oluseyi on March 18, 2002 1:12:05 PM]

Share this post


Link to post
Share on other sites