Link error

Aug 25, 2013 at 5:05pm
closed account (jwkNwA7f)
I have been googling this for a while now, but nothing I have found will work.
I am getting this error:
error LNK2019: unresolved external symbol _D3DXCreateSprite@8 referenced in function "public: void __thiscall 
Graphics::initialize(struct HWND__ *,int,int,bool)" (?initialize@Graphics@@QAEXPAUHWND__@@HH_N@Z)

I have included d3d9.h and d3dx9.h in Graphics.h. I have also added d3d9.lib to the project.

Thank you!
Aug 25, 2013 at 5:31pm
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.
Aug 25, 2013 at 6:09pm
closed account (jwkNwA7f)
Thanks for the reply. It says it can't open the file 'd3dx9d.lib'

Edit: I have located the file in the same folder as d3d9.lib
Last edited on Aug 25, 2013 at 6:14pm
Aug 25, 2013 at 6:23pm
Does it say why it can't open it? That's a very strange error.
Aug 25, 2013 at 6:27pm
closed account (jwkNwA7f)
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.
Aug 25, 2013 at 6:50pm
closed account (jwkNwA7f)
I found how to do it. Thank you!
Aug 25, 2013 at 8:38pm
closed account (jwkNwA7f)
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.

Edit: I fixed it.
Last edited on Aug 25, 2013 at 11:12pm
Topic archived. No new replies allowed.