The function you are looking for, "_D3DXCreateSprite()" can be found in "d3dx9d.lib" in the Microsoft DirectX SDK. It is distinctly different from 'd3d9.lib' which is in the regular Microsoft SDK.
I think I need to tell to search for the .lib file in another directory, but I am not sure how. I could find out how to do it in VS2010 but not in 2012.
Well, actually I still have a problem :(
I have put the path for the directory that has 'd3dx9d.lib' to the additional library dependencies under linker->General, and then I added 'd3dx9d,lib' to the additional dependencies under linker->input. It didn't say it couldn't find the file, so apparently it can open it. But, I am still getting the same errors.