Note that there IS a huge difference between d3dx9.lib and d3d9.lib.
Getting error LNK2019: unresolved external symbol _D3DXVec3Normalize@8 referenced in function?
In visual studio 2005, Go to TOOLS->OPTIONS.
In that window that comes up, in the left hand side of the window, pick “PROJECTS AND SOLUTIONS” -> VC++ DIRECTORIES from the tree.
ALSO do this:
In every code file, include a line at the top that says:
#pragma comment(lib, "d3dx9.lib") // d3dx9.lib contains actual code for D3DX functions (like D3DXVec3Normalize)
Although d3dx9.h contains the function prototypes and signatures for the D3DX functions, it DOES NOT contain the actual implementation code.
The implementation code is provided IN “d3dx9.lib” which is why you have to LINK it to the executable at compile time.