0
votes

Recently been trying to link needed include/libraries to my DirectX 9 project from the 'Microsoft DirectX SDK (June 2010)'. However when I compile I get the following: 1>LINK : fatal error LNK1104: cannot open file 'd3d9.h'. NOTE: I'm using Windows 10 with Visual Studio 2015.

Here is what I have done so far with the project settings in order to link the necessary files. 1. In VC++ Directories I have linked the Include and Library(x86). enter image description here

  1. In Linker>Input>Additional Dependencies I have added the necessary header files from DirectX 9. These are d3d9.h and d3dx9.h. enter image description here

  2. Here are my include statements. I only include d3d9.h and d3dx9.h from DirectX 9.

enter image description here

1
You won't link header files. You just add their directory to the search paths. Back to basics :/Youka
The reason why I'm asking the first place is because I'm following a tutorial on a different Visual Studio version, where my code works fine. No need to be a douchebag about it...Andreas Johansson

1 Answers

3
votes

As @Youka said in his comment, you shouldn't be linking header files. You link libraries - and this doesn't vary between versions of Visual Studio. Instead of having d3d9.h and d3dx9.h in the linker settings, you will want instead d3d9.lib and d3dx9.lib.