#include isn't working

Started by
2 comments, last by viper110110 11 years, 7 months ago
I am trying to follow http://www.rastertek.com/dx11tut03.html

After putting all the code in, I realized that I should be using DirectXMath.h instead of d3dx10math.h because the old one couldn't be found.

After switching to DirectXMath, I tried to switch one of the D3DXMATRIX to XMMATRIX and it couldn't find it. I used visual studio to go to DirectXMath.h and I found XMMATRIX, but it isn't working with the include and the compiler gives an error on XMMATRIX (not on the #include <DirectXMath.h> line). I also tried changing D3DX_PI to XM_PI and it didn't work either.
Advertisement
Did you update the include path?
Otherwise If you did, then move it to the front of PATH and see if it was a collision.
I don't think it's an include problem. Everything in DirectXMath.h is in the DirectX namespace. The simplest way to fix this is to add "using namespace DirectX;" to the top of your cpp file.
Thanks MJP, it worked. Also thanks for moving the thread.

This topic is closed to new replies.

Advertisement