Sign in to follow this  
Mr Kickass

Can't include d3dx9.h

Recommended Posts

If I try to include d3dx9.h the program does not compile - the debugger says there are all sorts of errors in d3dx9math.h which doesn't make sense to me. What could possibly cause something like this?

Share this post


Link to post
Share on other sites
Hi there Mr. Kickass, How are you doing?

The Problem
Problems with d3dx9math.h

The Solution
Chances might be that you are using Borland's c++/delphi compiler if you are just add a definition for the sqrtf function (square root).
#define sqrtf (float)sqrt

If not, refer to Coder's post. I hope this helps.
Take care buddy :)

Share this post


Link to post
Share on other sites
mod_render_d3d9 error C2059: syntax error : 'string'
mod_render_d3d9 error C2091: function returns function
mod_render_d3d9 error C2802: static member 'operator new' has no formal parameters
mod_render_d3d9 error C2059: syntax error : 'string'
mod_render_d3d9 error C2090: function returns array
mod_render_d3d9 error C2761: 'void *(__cdecl *_D3DXMATRIXA16::operator new(void))(size_t)' : member function redeclaration not allowed
mod_render_d3d9 fatal error C1903: unable to recover from previous error(s); stopping compilation

Those are the errors. All within d3dx9math.h, within a part having to do with D3DXMATRIX in some capacity.

If I include d3dx9.h after the other include in this .h file (which encompasses alot of crap), it generates this set of errors twice in the same sequence.

I am just looking for a general idea of what could possibly cause this.

Oh and I'm using Visual studio 2003. Defining sqrtf() had no effect (actually it produced more errors).

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