Why are all the sdk samples throwing these linker errors?
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.
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement