0

I've come back to a Univeristy project I developed 5 years ago using Visual Studio 2010 using DirectX11. I'm now using VS2017 Community edition and would like to upgrade the project to work with it.

I initially had some issues with my own classes but switching the toolkit from VS 2010 to VS 2017 ironed the majority out.

I seem to be having issues now with DirectX files such as D3DX11.h and D3D10.h throwing 'Cannot open source file 'insert file name here''. These files include: windows.h, limits.h, float.h (theres nearly 7000 errors all related)

I'm guessing it's not linked with the VS2017 toolkit either?

Any suggestions or even solutions?

  • Your guess is probably right. Try to locate the missing .h files and see if the directory they are in, is included in the default folders to look for .h files. – Stefan May 10 '18 at 18:14

1 Answers1

1

You should retarget solution to the Windows SDK version and Platform toolset installed on your system (Project Properties -> General tab). This should fix issues with Windows SDK (including DirectX headers) and C++ standard headers. Then D3DX*** are not part of current Windows + DirectX SDK, it is actually a part of deprecated separate DirectX SDK (see d3dx11.h missing?), modern applications should use DirectX Toolkit instead.

user7860670
  • 35,849
  • 4
  • 58
  • 84
  • See [MSDN](https://msdn.microsoft.com/en-us/library/windows/desktop/ee663275.aspx), [this blog post](https://blogs.msdn.microsoft.com/chuckw/2015/08/05/where-is-the-directx-sdk-2015-edition/), and [Living without D3DX](https://blogs.msdn.microsoft.com/chuckw/2013/08/20/living-without-d3dx/) – Chuck Walbourn May 10 '18 at 20:05
  • Hmmm that makes sense. I just want to somehow get this working with VS2017 without have to switch to DirectX Toolkit just yet. Thank you for the help. – James Southall May 10 '18 at 21:18
  • Note that there is now a [Microsoft.DXSDK.D3DX](https://www.nuget.org/packages/Microsoft.DXSDK.D3DX) NuGet package available to let you use D3DX11 without needing the legacy DirectX SDK. – Chuck Walbourn Mar 08 '21 at 08:51