Sign in to follow this  
Mark04

D3DApp.h Errors

Recommended Posts

Hi. I am trying the tutorials from this site (gamedev) and I followed the instructions carefully and compiled the code for one tutorial and found I was getting cannot include D3DApp.h So, I then copied it into the Project Directory folder for my game and then ran the code again and this time got 102 errors? lol. Any ideas why? Thanks. Mark.

Share this post


Link to post
Share on other sites
Hi.

The tutorial is the one called "Direct3D 7 IM Framework Programming 1: The Basics" under the articles section.

I have downloaded the source code and not edited any at all.

The SDK I have is: Microsoft DirectX 9.0 SDK (October 2004)

OK, Here's what happened when I put D3DApp.H in the project Directory:

[Source]
--------------------Configuration: tex1 - Win32 Debug--------------------
Compiling...
tex1.cpp
c:\downloads\new folder\d3dapp.h(43) : error C2146: syntax error : missing ';' before identifier 'Width'
c:\downloads\new folder\d3dapp.h(43) : error C2501: 'DWORD' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(43) : error C2501: 'Width' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(44) : error C2146: syntax error : missing ';' before identifier 'Height'
c:\downloads\new folder\d3dapp.h(44) : error C2501: 'DWORD' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(44) : error C2501: 'Height' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(45) : error C2146: syntax error : missing ';' before identifier 'Format'
c:\downloads\new folder\d3dapp.h(45) : error C2501: 'D3DFORMAT' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(45) : error C2501: 'Format' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(46) : error C2146: syntax error : missing ';' before identifier 'dwBehavior'
c:\downloads\new folder\d3dapp.h(46) : error C2501: 'DWORD' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(46) : error C2501: 'dwBehavior' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(47) : error C2146: syntax error : missing ';' before identifier 'DepthStencilFormat'
c:\downloads\new folder\d3dapp.h(47) : error C2501: 'D3DFORMAT' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(47) : error C2501: 'DepthStencilFormat' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(61) : error C2146: syntax error : missing ';' before identifier 'DeviceType'
c:\downloads\new folder\d3dapp.h(61) : error C2501: 'D3DDEVTYPE' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(61) : error C2501: 'DeviceType' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(62) : error C2146: syntax error : missing ';' before identifier 'd3dCaps'
c:\downloads\new folder\d3dapp.h(62) : error C2501: 'D3DCAPS8' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(62) : error C2501: 'd3dCaps' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(63) : error C2143: syntax error : missing ';' before '*'
c:\downloads\new folder\d3dapp.h(63) : error C2501: 'strDesc' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(64) : error C2146: syntax error : missing ';' before identifier 'bCanDoWindowed'
c:\downloads\new folder\d3dapp.h(64) : error C2501: 'BOOL' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(64) : error C2501: 'bCanDoWindowed' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(67) : error C2146: syntax error : missing ';' before identifier 'dwNumModes'
c:\downloads\new folder\d3dapp.h(67) : error C2501: 'DWORD' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(67) : error C2501: 'dwNumModes' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(71) : error C2146: syntax error : missing ';' before identifier 'dwCurrentMode'
c:\downloads\new folder\d3dapp.h(71) : error C2501: 'DWORD' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(71) : error C2501: 'dwCurrentMode' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(72) : error C2146: syntax error : missing ';' before identifier 'bWindowed'
c:\downloads\new folder\d3dapp.h(72) : error C2501: 'BOOL' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(72) : error C2501: 'bWindowed' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(73) : error C2146: syntax error : missing ';' before identifier 'MultiSampleType'
c:\downloads\new folder\d3dapp.h(73) : error C2501: 'D3DMULTISAMPLE_TYPE' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(73) : error C2501: 'MultiSampleType' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(87) : error C2146: syntax error : missing ';' before identifier 'd3dAdapterIdentifier'
c:\downloads\new folder\d3dapp.h(87) : error C2501: 'D3DADAPTER_IDENTIFIER8' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(87) : error C2501: 'd3dAdapterIdentifier' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(88) : error C2146: syntax error : missing ';' before identifier 'd3ddmDesktop'
c:\downloads\new folder\d3dapp.h(88) : error C2501: 'D3DDISPLAYMODE' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(88) : error C2501: 'd3ddmDesktop' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(91) : error C2146: syntax error : missing ';' before identifier 'dwNumDevices'
c:\downloads\new folder\d3dapp.h(91) : error C2501: 'DWORD' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(91) : error C2501: 'dwNumDevices' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(95) : error C2146: syntax error : missing ';' before identifier 'dwCurrentDevice'
c:\downloads\new folder\d3dapp.h(95) : error C2501: 'DWORD' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(95) : error C2501: 'dwCurrentDevice' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(120) : error C2146: syntax error : missing ';' before identifier 'm_dwNumAdapters'
c:\downloads\new folder\d3dapp.h(120) : error C2501: 'DWORD' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(120) : error C2501: 'm_dwNumAdapters' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(121) : error C2146: syntax error : missing ';' before identifier 'm_dwAdapter'
c:\downloads\new folder\d3dapp.h(121) : error C2501: 'DWORD' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(121) : error C2501: 'm_dwAdapter' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(122) : error C2146: syntax error : missing ';' before identifier 'm_bWindowed'
c:\downloads\new folder\d3dapp.h(122) : error C2501: 'BOOL' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(122) : error C2501: 'm_bWindowed' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(123) : error C2146: syntax error : missing ';' before identifier 'm_bActive'
c:\downloads\new folder\d3dapp.h(123) : error C2501: 'BOOL' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(123) : error C2501: 'm_bActive' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(124) : error C2146: syntax error : missing ';' before identifier 'm_bReady'
c:\downloads\new folder\d3dapp.h(124) : error C2501: 'BOOL' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(124) : error C2501: 'm_bReady' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(127) : error C2146: syntax error : missing ';' before identifier 'm_bFrameMoving'
c:\downloads\new folder\d3dapp.h(127) : error C2501: 'BOOL' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(127) : error C2501: 'm_bFrameMoving' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(128) : error C2146: syntax error : missing ';' before identifier 'm_bSingleStep'
c:\downloads\new folder\d3dapp.h(128) : error C2501: 'BOOL' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(128) : error C2501: 'm_bSingleStep' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(131) : error C2146: syntax error : missing ';' before identifier 'DisplayErrorMsg'
c:\downloads\new folder\d3dapp.h(131) : error C2501: 'HRESULT' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(131) : error C2061: syntax error : identifier 'HRESULT'
c:\downloads\new folder\d3dapp.h(134) : error C2146: syntax error : missing ';' before identifier 'BuildDeviceList'
c:\downloads\new folder\d3dapp.h(134) : error C2501: 'HRESULT' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(135) : error C2146: syntax error : missing ';' before identifier 'FindDepthStencilFormat'
c:\downloads\new folder\d3dapp.h(135) : error C2501: 'BOOL' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(135) : error C2061: syntax error : identifier 'UINT'
c:\downloads\new folder\d3dapp.h(137) : error C2146: syntax error : missing ';' before identifier 'Initialize3DEnvironment'
c:\downloads\new folder\d3dapp.h(137) : error C2501: 'HRESULT' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(138) : error C2146: syntax error : missing ';' before identifier 'Resize3DEnvironment'
c:\downloads\new folder\d3dapp.h(138) : error C2501: 'HRESULT' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(139) : error C2146: syntax error : missing ';' before identifier 'ToggleFullscreen'
c:\downloads\new folder\d3dapp.h(139) : error C2501: 'HRESULT' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(140) : error C2146: syntax error : missing ';' before identifier 'ForceWindowed'
c:\downloads\new folder\d3dapp.h(140) : error C2501: 'HRESULT' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(141) : error C2146: syntax error : missing ';' before identifier 'UserSelectNewDevice'
c:\downloads\new folder\d3dapp.h(141) : error C2501: 'HRESULT' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(142) : error C2146: syntax error : missing ';' before identifier 'Cleanup3DEnvironment'
c:\downloads\new folder\d3dapp.h(142) : error C2501: 'VOID' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(143) : error C2146: syntax error : missing ';' before identifier 'Render3DEnvironment'
c:\downloads\new folder\d3dapp.h(143) : error C2501: 'HRESULT' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(144) : error C2146: syntax error : missing ';' before identifier 'AdjustWindowForChange'
c:\downloads\new folder\d3dapp.h(144) : error C2433: 'HRESULT' : 'virtual' not permitted on data declarations
c:\downloads\new folder\d3dapp.h(144) : error C2501: 'HRESULT' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(145) : error C2146: syntax error : missing ';' before identifier 'SelectDeviceProc'
c:\downloads\new folder\d3dapp.h(145) : error C2061: syntax error : identifier 'HWND'
c:\downloads\new folder\d3dapp.h(150) : error C2146: syntax error : missing ';' before identifier 'm_d3dpp'
c:\downloads\new folder\d3dapp.h(150) : error C2501: 'D3DPRESENT_PARAMETERS' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(150) : error C2501: 'm_d3dpp' : missing storage-class or type specifiers
c:\downloads\new folder\d3dapp.h(150) : fatal error C1003: error count exceeds 100; stopping compilation
Error executing cl.exe.

tex1.exe - 102 error(s), 0 warning(s)
[/Source]


Any info, appreciated on what I did wrong.
Thanks

Mark.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this