# DirectX D3DXVec3Normalize unresolved external symbol

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.

• I found solution: included Lib folder was a promlem. I switched from x64 to x86 folder and it works ok now. – Phantom Jul 18 '13 at 12:34
• Add an answer to your own question and document the exact steps you went through to fix the issue. You can then accept the answer. This is great for people down the line who run into the same issue. – Dean Knight Jul 18 '13 at 13:55