Jump to content
  • Advertisement
Sign in to follow this  
newtechnology

Including headers from Windows 10 SDK

This topic is 1224 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So, I've downloaded Windows 10 SDK to test out directx 12 but when I try to include d3d12, it doesn't get included. I can include d3d11 but that is from Windows 8 SDK (C:\Program Files (x86)\Windows Kits\8.0\Include) and not Windows 10 (C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0)

Edited by newtechnology

Share this post


Link to post
Share on other sites
Advertisement

Check your project options and make sure that the Windows 10 SDK directories are listed in the include/lib paths.

Share this post


Link to post
Share on other sites

Please clarify what "doesn't get included" means. Do you get an error? If so, what is the exact error message? 

Share this post


Link to post
Share on other sites

Please clarify what "doesn't get included" means. Do you get an error? If so, what is the exact error message? 

#Include <d3d12.h> doesn't work (or IntelliSense doesn't detect that.)

@Dave:
Am I supposed to include path to Windows 10 SDK manually? I don't have to do this with Windows 8 SDK.

Share this post


Link to post
Share on other sites

 

Please clarify what "doesn't get included" means. Do you get an error? If so, what is the exact error message?

#Include <d3d12.h> doesn't work (or IntelliSense doesn't detect that.)

@Dave:
Am I supposed to include path to Windows 10 SDK manually? I don't have to do this with Windows 8 SDK.

 


You have to select the target platform in the project propriety window:
 

Cattura.png

Share this post


Link to post
Share on other sites

Sometimes installers don't do everything their supposed to do. It's best to check and make sure.

 

You say "IntelliSense doesn't detect that." Does it compile?

 

edit - ninja'd

Edited by Dave Hunt

Share this post


Link to post
Share on other sites

I had this issue, you have to install Visual Studio 2015 and on the install make sure you got to "custom install" and include all the C++ tools and the Windows SDK bundled with it... For some reason DX12 isn't shipped with the Windows SDK off the Microsoft website.

 

EDIT: 

 

On mine the d3d12 headers are located at "C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\um"

 

Also the DX12 samples use the D3DX12.h which isn't included in any Windows SDK, you have to get that header from the samples on GitHub https://github.com/Microsoft/DirectX-Graphics-Samples

Edited by Daganar

Share this post


Link to post
Share on other sites

I had this issue, you have to install Visual Studio 2015 and on the install make sure you got to "custom install" and include all the C++ tools and the Windows SDK bundled with it... For some reason DX12 isn't shipped with the Windows SDK off the Microsoft website.

 

EDIT: 

 

On mine the d3d12 headers are located at "C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\um"

 

Also the DX12 samples use the D3DX12.h which isn't included in any Windows SDK, you have to get that header from the samples on GitHub https://github.com/Microsoft/DirectX-Graphics-Samples

Thats because since DX11s release D3DX has been deprecated and shouldnt be used, if you want  a replacement for this look at DirectXToolkit at : https://directxtk.codeplex.com/

There are a few functions in the DirectX package that you have to be careful with if you ever want to release to windows store too, one of the ones a lot of people are probably using is D3DCompileFromFile

Share this post


Link to post
Share on other sites

Thats because since DX11s release D3DX has been deprecated and shouldnt be used, if you want  a replacement for this look at DirectXToolkit at : https://directxtk.codeplex.com/

d3dx12.h is a helper library that has nothing to do with old D3DX and/or DirectXTK.

It's not included in the Windows SDK, you can find a copy here.

Share this post


Link to post
Share on other sites

 

 

Please clarify what "doesn't get included" means. Do you get an error? If so, what is the exact error message?

#Include <d3d12.h> doesn't work (or IntelliSense doesn't detect that.)

@Dave:
Am I supposed to include path to Windows 10 SDK manually? I don't have to do this with Windows 8 SDK.

 


You have to select the target platform in the project propriety window:
 

Cattura.png

 

I don't have that option in my visual studio (2013 community).

 

@Dave: ofcourse not.

2 IntelliSense: cannot open source file "d3d12.h" k:\Visual Studio Projects\NT Engine\Application\Application.cpp 2
Error 1 error C1083: Cannot open include file: 'd3d12.h': No such file or directory k:\visual studio projects\nt engine\application\application.cpp 2


I think I'll have to install Visual Studio 2015 (Community). But it's 3 GB only, how come it is supposed to have Windows SDK in it? (cause Windows SDK itself is around 2 GB)
BTW, I am downloading the .iso file and not the installer (vs_community.exe).

Also, after upgrading to Windows 10, my D3D11CreateDevice() fails on debug .exe because in debug mode, I've this flag setup: D3D11_CREATE_DEVICE_DEBUG

This is what I get in logs:
D3D11CreateDevice: Flags (0x2) were specified which require the D3D11 SDK Layers for Windows 10, but they are not present on the system.
These flags must be removed, or the Windows 10 SDK must be installed.
Flags include: D3D11_CREATE_DEVICE_DEBUG
First-chance exception at 0x75283E28 in Application.exe: Microsoft C++ exception: _com_error at memory location 0x00C0E944.
 
I've Windows SDK 10 installed already but still it gives me that error. I am downloading VS 2015 and it'll take more time for me because of slow connection. I'll report back if all these errors are fixed in VS 2015.

 

Edited by newtechnology

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!