VC++ 2005 & DX8 error/problems.
I didn't post this in DirectX forum, because I'm sure it's my lack on knowledge of 2005.
I'm trying to compile the 5th example from DirectX 8 Graphics and Video: A Fresh Start & I'm getting a lot of errors. Any help to show me what I'm doing wrong will be greatly appreciated.
------ Build started: Project: Example 5, Configuration: Debug Win32 ------
Compiling...
d3d5.cpp
c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(222) : error C2146: syntax error : missing ';' before identifier 'PVOID64'
c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(222) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(5940) : error C2146: syntax error : missing ';' before identifier 'Buffer'
c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(5940) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(5940) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\phil\desktop\gdnet dx8 fresh start\dx8tutor\d3d5.cpp(160) : error C2065: 'ii' : undeclared identifier
dxtest.cpp
c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(222) : error C2146: syntax error : missing ';' before identifier 'PVOID64'
c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(222) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(5940) : error C2146: syntax error : missing ';' before identifier 'Buffer'
c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(5940) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(5940) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\phil\desktop\gdnet dx8 fresh start\dx8tutor\dxtest.cpp(29) : error C3861: '_T': identifier not found
Generating Code...
Creating browse information file...
Microsoft Browse Information Maintenance Utility Version 8.00.50727
Copyright (C) Microsoft Corporation. All rights reserved.
Build log was saved at "file://c:\Documents and Settings\Phil\Desktop\GDnet DX8 fresh start\DX8TUTOR\EXAMPLE 5\Debug\BuildLog.htm"
Example 5 - 12 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
As near as I can tell, VS2005 won't compile any code based on DX8; for me, it wouldn't even compile 9.0b code. The best course of action would be to seek out Visual Studio 2003 (not sure if that works with DX8 code, but it should), or upgrade to a newer version of the SDK that works with 2005 (I've had no problems with December 2005 and up).
I honestly, can't help you much but it looks like the problem is with your Platform SDK and not Direct X. There is one DirectX error at the end but I'd try solving the winnt.h problem first.
Quote:Original post by PSWindThat's part of the problem. I'm not directly calling "winnt.h" and it's Windows platform SDK header, I can only guess that it's being called by DX header or <windows.h> in the example.
I honestly, can't help you much but it looks like the problem is with your Platform SDK and not Direct X. There is one DirectX error at the end but I'd try solving the winnt.h problem first.
[Edited by - Lost on March 27, 2006 5:02:07 AM]
I was able to build some DX8 samples in VS2005 by:
1. Adding the Platform SDK include path ("C:\Program Files\Microsoft SDK\include" on my machine) to VS2005's include directories, and moving it _above_ VS2005's "$(VCInstallDir)PlatformSDK\include". That makes the winnt.h errors go away.
2. Moving the declarations of various 'for' loop index variables outside of the 'for' statements, to let them remain in scope for later use. That resolved "undeclared identifier" errors.
1. Adding the Platform SDK include path ("C:\Program Files\Microsoft SDK\include" on my machine) to VS2005's include directories, and moving it _above_ VS2005's "$(VCInstallDir)PlatformSDK\include". That makes the winnt.h errors go away.
2. Moving the declarations of various 'for' loop index variables outside of the 'for' statements, to let them remain in scope for later use. That resolved "undeclared identifier" errors.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement