DirectX7 Compile Problems

Started by
5 comments, last by Remedy 23 years, 11 months ago
Alright, Alright. I''m a newbie and I have a really big problem concerning compilation in Visual C++ 6.0. Alright, I''m just starting to learn DirectX using the DirectX7 version. Now, when I compile, it gives me an error: "unresolved external IID_IDirectDraw7". I''m thinking that maybe I don''t have DirectX7 installed (which I know I installed from a cd) or maybe there''s something wrong with the linking. I''m totally sure that I''ve set all the necessary options in order to make it compile right such as putting ddraw.lib in the linker options and setting the Lib and Include Files and then putting them on top so that it will correctly read the files. I double checked and everything was correct. BUT! When I use an earlier version of DirectX, it compiles correctly. Oh, and also, when you usually type in DirectX functions, this little thing pops up and shows you valid paremeters for the function, but it doesn''t do that specifically for DirectX7, it only does it for earlier DirectX. hRet = DirectDrawCreate(NULL, &lpDD, NULL); /* This is when the little thing pops up to show the valid paremeters */ hRet = DirectDrawCreateEx(NULL, (LPVOID *) &lpDD, IID_IDirectDraw7, NULL); /* Ack! It does not show up when I do this */ Please help this Newbie out. Thanks. Remedy@icestorm.net
Remedy
Advertisement
If you have not done one of the following, try one.

#define INITGUID //Must be defined only once in the whole project

link to dxguid.lib


Also, a small trick to get (un)intellisence to work with directx is to add the directx headers to your project and then remove them again. The box will usually pop up then.

*Sparkle*
correct me if i''m wrong, but...
MSVC++ (6.0, at least) ships with an older version of the DirectX SDK.. functions and objects that exist in that old version give you the little pop up thing (like DirectDrawCreate() ), but things that weren''t introduced into DirectX in that old version (such as DirectDrawCreateEx() ) don''t, because MSVC++ is a stuborn bastard.. it doesn''t effect compilation, linking, or running, though.. i''ll have to try what Sparkle said and remove the headers from the project and put them back in.. but that''s nothing to worry about...

about the unresolved external symbol stuff, that drove me crazy for a while too.. just make sure you add dxguid.lib to your project, and it should link fine...
Hi!

If you have the "old LIB''s" problem, try to put the DirectX Lib and Include Directories on the first place in Project / Options. I almost screw up !
In project settings on the link page link to
dxguid.lib and ddraw.lib

In the environment options / directories under
libraries add the directory for the lib-files.
Make sure that the added directory is listed before
any of the default directories added by Visual Studio
as the system otherwise will use the old libraries.

Jacob Marner
Jacob Marner, M.Sc.Console Programmer, Deadline Games
Under project linker settings try including ddraw.lib as one of the libraries. I go that same error before when I forgot that little brat. ;-)
HEY! I didn''t post this post(well I posted this one but not the other one...?), but I have had the exact same problems as Remedy. Exact.. So thanX 4 all the replies... (I hope it works)
That bloody dxguid.lib file.. Nobody told ME 2 link it...

This topic is closed to new replies.

Advertisement