Sign in to follow this  
DirectXFreak

Why are all the sdk samples throwing these linker errors?

Recommended Posts

Hey, I have .NET set up with DirectX, and I have the directories linked with the .libs for DirectX and all, but whenever I try and compile a sample, it throws these linker errors: Ambient error LNK2001: unresolved external symbol _IID_IDirect3DBaseTexture9 Ambient error LNK2001: unresolved external symbol _IID_IDirect3DCubeTexture9 Ambient error LNK2001: unresolved external symbol _IID_IDirect3DSwapChain9 Ambient error LNK2001: unresolved external symbol _IID_IDirect3DTexture9 Ambient error LNK2001: unresolved external symbol _IID_IDirect3DVolumeTexture9 As far as I know, I am inluding all the .libs required, (d3d9.lib d3dx9.lib winmm.lib dxguid.lib) So, what am I doing wrong? Thanks.

Share this post


Link to post
Share on other sites
Assuming you installed the DirectX SDK in the traditional way and didn't encounter any installation problems, something else to look at is:


1) go to Tools->Options... in MSVC.NET

2) then go to the Projects->VC++ Directories settings

3) under "Show Libraries For:" select Library Files

4) ensure that the path to the DirectX 9 SDK lib folder is:
a. actually in that list
b. at the TOP of the list

5) repeat steps 3&4 for Include Files


It's possible that the compiler is picking up an older version of the dxguid.lib file, perhaps from the Platform SDK installed when you installed MSVC.NET

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this