Jump to content
  • Advertisement
Sign in to follow this  
Trandafira

DirectX Linking Errors

This topic is 4031 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey guys... I've just installed VS 2005 and am having problems compiling. My first problem was that Visual studio couldn't find the d3d9.h / d3dx9.h etc files. I resolved this by adding the DirectX Directory to the VC++ Directories option in Options. However, how when i build i recieve link errors relating to DirectX: - error LNK2019: unresolved external symbol _D3DXVec4Transform@12 referenced in function "public: bool const __thiscall CBoundingBox::TransformVerticesByMatrix(struct D3DXMATRIX const &)" (?TransformVerticesByMatrix@CBoundingBox@@QAE?B_NABUD3DXMATRIX@@@Z) - error LNK2001: unresolved external symbol _GUID_SysKeyboard - unresolved external symbol _Direct3DCreate9@4 are just a few, basicly everything that has to do with DirectX =S.. Is there anyone who has experienced this problem too and could help me out? Thanks Jono

Share this post


Link to post
Share on other sites
Advertisement
Sounds like you're not linking to the DirectX libraries. Add the lib directory from the SDK (make sure you pick the right platform - x86 or x64) to VC++'s Directories (under Library Files), and then specify the libraries that you need (d3d9.lib, etc.). You can do this by going to Project -> Properties -> Linker -> Command Line and writing them in Additional Options.

Share this post


Link to post
Share on other sites
First make sure you've also added the correct path to DirectX libraries to VC++ Directories. To do so go to Tools->Options->Projects and Solutions->VC++ Directories->Choose "Library files" from the drop down list under "Show directories for:" and make sure to add the correct path for your platform, i.e. x86 or x64.
Afterwards go to the Project Property Page->Linker->Input->Additional Dependencies and add d3d9.lib, d3dx9.lib and dxguid.lib.
That's pretty much all you need to do.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!