Jump to content
  • Advertisement
Sign in to follow this  
utilae

D3D9 compile errors*solved*

This topic is 5063 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, Im trying to compile a empty direct3d9 app (eg just load and release direct3d devices) and I get all these syntax errors that are found in existing directx9 include files. Is there some .libs or includes I should have included. Im using visual studio .net 2003, c++ and direct3d9. edit: relisted my code, etc below. [Edited by - utilae on January 8, 2005 12:56:48 AM]

Share this post


Link to post
Share on other sites
Advertisement
ok, can no one help me. If anyone can recognise these errors and tell me how to remove them, that would be great.

Basically I get no errors in my own code. All these errors are syntax errors in directx9 code (which seems unusual).

Share this post


Link to post
Share on other sites
Is that the only errors you get?

If you get syntax errors that are in other files, be sure to correct them first because the actual syntax error is not always where the compiler thinks...

What .libs have you included btw?

Share this post


Link to post
Share on other sites
with directx9 I am not sure what libs I should include, but here is what I have included:

dxguid.lib winmm.lib d3dx9d.lib d3d9.lib

Share this post


Link to post
Share on other sites
I can't solve my problems at all, so here's my code:

I'm not sure what libs I should use or what direct3d9 header files I should include, but I must be missing something. Note: this is not all my code, just the important parts dealing with direct3d9.

//libs ive used are:
//dxguid.lib winmm.lib d3d8.lib d3dx9d.lib d3d9.lib d3dx9.lib
//includes
#include <d3dx9.h>

//globals
IDirect3D9* g_pD3D9=NULL;//Pointer to a IDirect3D9 interface
IDirect3DDevice9* g_pD3DDevice9=NULL;//Pointer to a IDirect3DDevice9 interface
D3DPRESENT_PARAMETERS g_d3dpp;//D3D9 presentation parameters




/////////load/////////////////
//Create an IDirect3D9 Object
g_pD3D9 = Direct3DCreate9(D3D_SDK_VERSION);

// set the presentation parameters
ZeroMemory(&g_d3dpp, sizeof(g_d3dpp));
g_d3dpp.BackBufferWidth = 1024;
g_d3dpp.BackBufferHeight = 768;
g_d3dpp.BackBufferCount = 1;
g_d3dpp.MultiSampleType=D3DMULTISAMPLE_NONE; //No multi-sampling
g_d3dpp.MultiSampleQuality=0;
g_d3dpp.BackBufferFormat = D3DFMT_R5G6B5;
g_d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
g_d3dpp.hDeviceWindow = hWndMain;
g_d3dpp.Windowed = false;
g_d3dpp.EnableAutoDepthStencil = false;
g_d3dpp.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT;
g_d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;

//create an IDirect3DDevice9 object
g_pD3D9->CreateDevice(D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL,hWndMain,D3DCREATE_HARDWARE_VERTEXPROCESSING,&g_d3dpp,&g_pD3DDevice9)




/////////unload/////////////////
if(g_pD3DDevice9)
{
g_pD3DDevice9->Release();
g_pD3DDevice9=NULL;
}

if(g_pD3D9)
{
g_pD3D9->Release();
g_pD3D9=NULL;
}




/////loop//////
g_pD3DDevice9->Clear(0,NULL,D3DCLEAR_TARGET,D3DCOLOR_XRGB
(255,255,255),1.0f,0);

g_pD3DDevice9->BeginScene();

//render here

g_pD3DDevice9->EndScene();

g_pD3DDevice9->Present(NULL,NULL,NULL,NULL);





Here's the full list of errors I get:

d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(787) : error C2143: syntax error : missing ',' before '*'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(792) : error C2143: syntax error : missing ',' before '*'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(797) : error C2143: syntax error : missing ',' before '*'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(802) : error C2143: syntax error : missing ',' before '*'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(1747) : error C2061: syntax error : identifier 'LPDIRECT3DCUBETEXTURE9'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(790) : error C2065: 'm' : undeclared identifier
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(796) : error C3861: 'm': identifier not found, even with argument-dependent lookup
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1987) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1987) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1987) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1988) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1988) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1988) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1989) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1989) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1989) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1990) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1990) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1990) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1992) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1992) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1992) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1992) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(2005) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(2005) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(2005) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(2005) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(2006) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(2006) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(2006) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(2006) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(2007) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(2007) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(2007) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(2007) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(2008) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(2008) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(2008) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(2008) : error C2039: 'm' : is not a member of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(312) : see declaration of 'D3DXMATRIX'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(76) : error C2065: 'LPDIRECT3DDEVICE9' : undeclared identifier
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(76) : error C2146: syntax error : missing ')' before identifier 'pDevice'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(76) : warning C4229: anachronism used : modifiers on data are ignored
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(76) : error C2059: syntax error : ')'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(206) : error C2061: syntax error : identifier 'LPDIRECT3DDEVICE9'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(215) : error C2061: syntax error : identifier 'LPDIRECT3DTEXTURE9'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(230) : error C3861: 'LPDIRECT3DDEVICE9': identifier not found, even with argument-dependent lookup
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(230) : error C2146: syntax error : missing ')' before identifier 'pDevice'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(230) : warning C4229: anachronism used : modifiers on data are ignored
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(231) : error C2059: syntax error : ')'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(322) : error C2061: syntax error : identifier 'LPDIRECT3DDEVICE9'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(329) : error C2061: syntax error : identifier 'LPDIRECT3DTEXTURE9'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(377) : error C3861: 'LPDIRECT3DDEVICE9': identifier not found, even with argument-dependent lookup
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(377) : error C2146: syntax error : missing ')' before identifier 'pDevice'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(377) : warning C4229: anachronism used : modifiers on data are ignored
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(388) : error C2059: syntax error : ')'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(392) : error C3861: 'LPDIRECT3DDEVICE9': identifier not found, even with argument-dependent lookup
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(392) : error C2146: syntax error : missing ')' before identifier 'pDevice'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(392) : warning C4229: anachronism used : modifiers on data are ignored
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(403) : error C2059: syntax error : ')'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(414) : error C3861: 'LPDIRECT3DDEVICE9': identifier not found, even with argument-dependent lookup
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(414) : error C2146: syntax error : missing ')' before identifier 'pDevice'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(414) : warning C4229: anachronism used : modifiers on data are ignored
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(416) : error C2059: syntax error : ')'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(420) : error C3861: 'LPDIRECT3DDEVICE9': identifier not found, even with argument-dependent lookup
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(420) : error C2146: syntax error : missing ')' before identifier 'pDevice'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(420) : warning C4229: anachronism used : modifiers on data are ignored
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(422) : error C2059: syntax error : ')'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(459) : error C2146: syntax error : missing ';' before identifier 'Format'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(459) : error C2501: '_D3DXRTS_DESC::D3DFORMAT' : missing storage-class or type specifiers
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(459) : error C2501: '_D3DXRTS_DESC::Format' : missing storage-class or type specifiers
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(461) : error C2146: syntax error : missing ';' before identifier 'DepthStencilFormat'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(461) : error C2501: '_D3DXRTS_DESC::D3DFORMAT' : missing storage-class or type specifiers
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(461) : error C2501: '_D3DXRTS_DESC::DepthStencilFormat' : missing storage-class or type specifiers
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(486) : error C2061: syntax error : identifier 'LPDIRECT3DDEVICE9'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(489) : error C2061: syntax error : identifier 'LPDIRECT3DSURFACE9'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(503) : error C3861: 'LPDIRECT3DDEVICE9': identifier not found, even with argument-dependent lookup
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(503) : error C2146: syntax error : missing ')' before identifier 'pDevice'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(503) : warning C4229: anachronism used : modifiers on data are ignored
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(509) : error C2059: syntax error : ')'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(549) : error C2146: syntax error : missing ';' before identifier 'Format'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(549) : error C2501: '_D3DXRTE_DESC::D3DFORMAT' : missing storage-class or type specifiers
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(549) : error C2501: '_D3DXRTE_DESC::Format' : missing storage-class or type specifiers
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(551) : error C2146: syntax error : missing ';' before identifier 'DepthStencilFormat'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(551) : error C2501: '_D3DXRTE_DESC::D3DFORMAT' : missing storage-class or type specifiers
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(551) : error C2501: '_D3DXRTE_DESC::DepthStencilFormat' : missing storage-class or type specifiers
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(576) : error C2061: syntax error : identifier 'LPDIRECT3DDEVICE9'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(580) : error C2061: syntax error : identifier 'LPDIRECT3DCUBETEXTURE9'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(583) : error C2061: syntax error : identifier 'LPDIRECT3DTEXTURE9'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(586) : error C2061: syntax error : identifier 'LPDIRECT3DTEXTURE9'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(590) : error C2061: syntax error : identifier 'LPDIRECT3DTEXTURE9'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(593) : error C2061: syntax error : identifier 'D3DCUBEMAP_FACES'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(607) : error C3861: 'LPDIRECT3DDEVICE9': identifier not found, even with argument-dependent lookup
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(607) : error C2146: syntax error : missing ')' before identifier 'pDevice'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(607) : warning C4229: anachronism used : modifiers on data are ignored
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(613) : error C2059: syntax error : ')'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(700) : error C2061: syntax error : identifier 'LPDIRECT3DDEVICE9'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(740) : error C3861: 'LPDIRECT3DDEVICE9': identifier not found, even with argument-dependent lookup
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(740) : error C2146: syntax error : missing ')' before identifier 'pDevice'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(740) : warning C4229: anachronism used : modifiers on data are ignored
d:\Applications\DirectX 9.0 SDK\Include\d3dx9core.h(741) : error C2059: syntax error : ')'
d:\Applications\DirectX 9.0 SDK\Include\d3dx9mesh.h(103) : error C2065: 'MAXD3DDECLLENGTH' : undeclared identifier
d:\Applications\DirectX 9.0 SDK\Include\d3dx9mesh.h(104) : fatal error C1903: unable to recover from previous error(s); stopping compilation


I'm not using any of these either: d3dx9math.h, d3dx9core.h, d3dx9mesh.h
So I don't know why errors for those are showing up, rather then my own code.

HELP please.

[Edited by - utilae on January 7, 2005 10:22:36 PM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!