Jump to content
  • Advertisement
Sign in to follow this  
LostSnow25

Tons of errors after including d3dx9.h

This topic is 3621 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

Right after including that I got errors that seem to be all the same, and here they are.... d3dx9mesh.h(852) : error C2065: 'LPD3DXFILEDATA' : undeclared identifier d3dx9mesh.h(852) : error C2146: syntax error : missing ')' before identifier 'pxofMesh' d3dx9mesh.h(852) : warning C4229: anachronism used : modifiers on data are ignored d3dx9mesh.h(859) : error C2059: syntax error : ')' d3dx9mesh.h(865) : error C2065: 'LPD3DXFILEDATA' : undeclared identifier d3dx9mesh.h(865) : error C2146: syntax error : missing ')' before identifier 'pxofMesh' d3dx9mesh.h(865) : warning C4229: anachronism used : modifiers on data are ignored d3dx9mesh.h(873) : error C2059: syntax error : ')' d3dx9mesh.h(913) : error C2065: 'LPD3DXFILEDATA' : undeclared identifier d3dx9mesh.h(913) : error C2146: syntax error : missing ')' before identifier 'pXofObjMesh' d3dx9mesh.h(913) : warning C4229: anachronism used : modifiers on data are ignored d3dx9mesh.h(919) : error C2059: syntax error : ')' d3dx9tex.h(1681) : error C2061: syntax error : identifier 'LPD3DXTEXTURESHADER' d3dx9tex.h(1687) : error C2061: syntax error : identifier 'LPD3DXTEXTURESHADER' d3dx9tex.h(1693) : error C2061: syntax error : identifier 'LPD3DXTEXTURESHADER' d3dx9anim.h(218) : error C2061: syntax error : identifier 'LPD3DXFILEDATA' d3dx9anim.h(221) : error C2061: syntax error : identifier 'LPD3DXFILEDATA' d3dx9anim.h(224) : error C2061: syntax error : identifier 'LPD3DXFILEDATA' d3dx9anim.h(243) : error C2061: syntax error : identifier 'LPD3DXFILESAVEOBJECT' d3dx9anim.h(247) : error C2061: syntax error : identifier 'LPD3DXFILESAVEOBJECT' d3dx9anim.h(252) : error C2061: syntax error : identifier 'LPD3DXFILESAVEOBJECT' d3dx9anim.h(253) : error C2061: syntax error : identifier 'LPD3DXFILESAVEOBJECT' d3dx9anim.h(256) : error C2061: syntax error : identifier 'LPD3DXFILE' d3dx9anim.h(257) : error C2061: syntax error : identifier 'LPD3DXFILESAVEOBJECT' Am I missing some file or something, any help would be helpful?

Share this post


Link to post
Share on other sites
Advertisement
I think you have to include the D3DX headers. Sorry if that is wrong. I haven't worked with DirectX in a while, but that is what the errors are saying.

Share this post


Link to post
Share on other sites
Thx I will download the headers since I dont have them. I was following a directX9 tutorial and after adding that one line I got those errors so I must be missing something.

Share this post


Link to post
Share on other sites
Download the headers? Did you get the SDK piecemeal or something? You should download and install the DirectX SDK from Microsoft; that will ensure you have the latest, correct files.

That is, unless you are using Dev-C++, in which case you should throw Dev-C++ away and get Visual C++ Express. It will make things much easier; compatibility between DX and Dev-C++ is... icky.

Share this post


Link to post
Share on other sites
lol bad on my part.....

I thought I had the sdk on my machine but after checking it seems I do not -sign- im installing it right now...

Share this post


Link to post
Share on other sites
We might as well preempt the next problem while we're at it:

After you include the headers, you will get a gazillion linker errors. You need to make sure that you add the DX libraries under Project Properties->Linker->Input--Additional libraries (or something to that effect). And, of course, the linker needs to be in the library path, which you can modify under the tools->options menu or under project properties->linker->general--Additional library paths (or something to that effect).

Share this post


Link to post
Share on other sites
ok thx

I linked everything and its working fine. I linked to d3d9 and d3dx9 and when addeding code for a camera I get this linking error.

error LNK2019: unresolved external symbol _D3DXMatrixPerspectiveFovLH@20 referenced in function "void __cdecl SetUpCamera(struct IDirect3DDevice9 *)" (?SetUpCamera@@YAXPAUIDirect3DDevice9@@@Z)

The tutorial I am using did not say a error would appear so I was wondering what .lib file this is for?

Share this post


Link to post
Share on other sites
That error usually means you did not link to the D3DX library. But other errors might/would have occurred.

A couple ideas...

1. The function "D3DXMatrixPerspectiveFovLH" is depreciated.

2. You only added the library reference in a one mode (Debug or Release) and used the opposite compiling mode.

3. Linker directories are wrong or have not been added.

When looking at your previous errors, most of them are header based errors (declarations). An unresolved external symbol error means the library (.dll) was not linked or the function does not exist. I think you have to add a different directory to the SDK to use D3DX; I am sure someone will correct me if I am wrong.

Good luck, and have a good one!

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!