简体   繁体   English

DirectX 11文件无法打开源文件

[英]DirectX 11 files cannot open source files

I've come back to a Univeristy project I developed 5 years ago using Visual Studio 2010 using DirectX11. 我回到5年前使用Visual Studio 2010和DirectX11开发的Univeristy项目。 I'm now using VS2017 Community edition and would like to upgrade the project to work with it. 我现在正在使用VS2017社区版,并希望升级该项目以使其能够使用。

I initially had some issues with my own classes but switching the toolkit from VS 2010 to VS 2017 ironed the majority out. 最初,我自己的课程遇到一些问题,但将工具包从VS 2010切换到VS 2017消除了大多数人的烦恼。

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 ''. 我现在似乎对DirectX文件(例如D3DX11.h和D3D10.h)遇到问题,并抛出``无法打开源文件'' 在此处插入文件名 ''。 These files include: windows.h, limits.h, float.h (theres nearly 7000 errors all related) 这些文件包括:windows.h,limits.h,float.h(与之相关的近7000个错误)

I'm guessing it's not linked with the VS2017 toolkit either? 我猜它也没有与VS2017工具包链接吗?

Any suggestions or even solutions? 有什么建议甚至解决方案吗?

You should retarget solution to the Windows SDK version and Platform toolset installed on your system (Project Properties -> General tab). 您应该将解决方案重新定位到系统上安装的Windows SDK版本和平台工具集(“项目属性”->“常规”选项卡)。 This should fix issues with Windows SDK (including DirectX headers) and C++ standard headers. 这应该可以解决Windows SDK(包括DirectX标头)和C ++标准标头的问题。 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. 那么D3DX***不是当前Windows + DirectX SDK的一部分,它实际上是不推荐使用的单独DirectX SDK的一部分(请参阅d3dx11.h缺少吗? ),现代应用程序应该改用DirectX Toolkit

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM