Many syntax errors and type specifier errors occur when you try to build a DirectX-based C++ application in Visual Studio 2005

This article has been archived. It is offered "as is" and will no longer be updated.
Symptoms
When you try to build a Microsoft DirectX-based C++ application in Microsoft Visual Studio 2005, many syntax errors and type specifier errors occur.
Cause
This problem occurs when the DirectX include file directive is located before the Microsoft Windows include file directive. For example, in the following code example, the DirectX include file directive is incorrectly located before the Windows include file directive.
#include <d3dx9.h>#include <windows.h>
Note This problem may occur after you use the Visual Studio Conversion Wizard to convert the application to Visual Studio 2005, and the order of the include file directives was changed before the conversion.
Resolution
To resolve this problem, put the DirectX include file directive after the Windows include file directive.
More information
For more information about DirectX-based applications, visit the DirectX Developer Center at the following Microsoft Developer Network (MSDN) Web site:
Properties

Article ID: 908269 - Last Review: 01/16/2015 15:34:06 - Revision: 2.0

  • Microsoft Visual Studio 2005 Standard Edition
  • Microsoft Visual Studio 2005 Professional Edition
  • Microsoft Visual C++ 2005 Express Edition
  • kbnosurvey kbarchive kbdirectxsdk kbcompiler kbtshoot kbprb KB908269
Feedback