Why are all the sdk samples throwing these linker errors?

Started by
2 comments, last by DirectXFreak 18 years, 9 months ago
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.
--m_nPostCount++
Advertisement
You sure you link the good libraries ? There is 2 folder in DX SDK, one for x86 CPUs and one for x64 CPUs.
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

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

That fixed the problem! Thanks! :-)
--m_nPostCount++

This topic is closed to new replies.

Advertisement