Advertisement

Problem setting up DirectX

Started by March 27, 2001 09:07 PM
4 comments, last by RegularKid 23 years, 10 months ago
I am using the directX library from the book "Tricks of the Windows Game Programming Gurus" and am having a very strage problem. I was using Visual C++ 4.0 and DirectX 6 and everything was working fine. But then I just updated to Visual C++ 6.0 and have got nothing but error messages. I set it up the same way as in VC4: 1. Create a new project (Win32 Application) 2. Added the files I wanted (game.cpp, tdlib1.cpp, tdlib2.cpp and tdlib3.cpp) 3. #included ddraw.h, dinput.h, dsound.h, tdlib1.h, tdlib2.h and tdlib3.h to my game.cpp 3. Made sure that the tdlib.h files (1,2 and 3) were in the same directory as the .cpp files for this project 4. Set up the directories to point to directx header and library files (C:\MSSDK\INCLUDE and C:\MSSDK\LIB) 5. Added ddraw.lib, dinput.lib, dsound.lib and winmm.lib to my list of linked files (under Project->Settings...-> on the link tab) 6. Built the project And for some reason I get an error saying that "'LPDIRECTDRAWSURFACE4' : undeclared identifier". But the weird thing is that all this done the exact same way with the exact same files works perfectly with VC4. What do I need to do differently with VC6.0? Edited by - felisandria on March 27, 2001 10:21:27 PM
Go back to your settings and where it says settings for: select Debug. As I look at my settings that is the one that the lib files are linked into. Also use the rebuild all command sometimes that works. Also make sure you include dxguid.lib is probably what you are missing.
Advertisement
No, I added dxguid.lib to my link settings and rebuilt everything and it still didn''t work. Anything else?
If you have direct x sdk open a sdk project in 6.0 and delete the files of that project and add yours might work.
The cd that comes with the book has sdk actually as I recall.



Edited by - Maxim on March 27, 2001 10:36:55 PM
Thats a bit freaky. Make sure that the C:\MSSDK\INCLUDE and C:\MSSDK\LIB directories are at the top of the directory lists.
Thanks for everyones help. The problem was that the directory where VC would find the DirectX .h and .lib files wasn''t the first in the list. Thanks for the help!

This topic is closed to new replies.

Advertisement