Visual Studio 2005 + DirectX 9
I recently work on a Visual C++ project compiled under Visual Studio 2005 IDE. The project uses the old DirectDraw features that are still being supported in DirectX 9 SDK That SDK was released on
Microsoft DirectX 9 SDK
Anyway, the first thing I did is to install VS2005 but it failed at first. It turned out the installation program has problem handling a directory containing a white space. Ha Ha! Funny!
After the installation of the VS2005, I then installed DirectX 9 SDK. Everything went very smoothly. I remember 5 years ago when I installed the DirectX 9 on my XP, it crashed on my Dell machine. It was a blue screen crash. My fix back then is to enter the safe mode and then enable “release mode” in DirectX. I guess now XP with the latest service pack 2 does get stable.
Compiling the project also gave me a small headache. The first error I got is “ddraw.h” cannot be found. After I added the DirectX include directory into the project properties, I still got some strange errors like this:
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winnt.h(222) : error C2146: syntax error : missing ';' before identifier 'PVOID64'
Then after spending some time playing with all the settings, I found the actual fix is to use “tools” --> “options” --> ”VC++ Directories” --> ”include files” (top right drop down list).
I need to include the “C:\DXSDK\Include” as the last entry. And then I will have to add “C:\DXSDK\Lib” in the “library files”. That fixed everything for me …

0 Comments:
Post a Comment
<< Home