I have simple DirectX project:
#include <d3dx10.h>
#include <d3dx10math.h>
#pragma comment(lib, "d3d10.lib")
#pragma comment(lib, "d3dx10.lib")
int main()
{
D3DXVECTOR3 u(1.0f, 2.0f, 3.0f);
D3DXVECTOR3 v(2.0f, 1.0f, 3.0f);
D3DXVECTOR3 a, b, c, d, e;
float l = D3DXVec3Length(&u);
float s = D3DXVec3Dot(&u, &v);
D3DXVec3Normalize(&d, &u); // <- problem is here
return 0;
}
I added "include" and "lib" directories in my project properties and everything works fine, except D3DXVec3Normalize line. When I run the program it says: "error LNK2019: unresolved external symbol _D3DXVec3Normalize@8 referenced in function _main".
Can anyone explain why D3DXVec3Length and D3DXVec3Dot functions work OK (without Normalize line) and D3DXVec3Normalize produces error?
P.S. I use DirectX SDK June 2010 and Visual Studio 2012.