IID_DirectDraw4???

Started by
1 comment, last by RickyPiller 22 years, 1 month ago
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
****************************If religious DONOT read****************************Jesus was the best skam artist of all times.
Advertisement
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?!?!
-- Are you not entertained?!?!
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]

This topic is closed to new replies.

Advertisement