Cannot open include file: 'ntddk.h'

Ezzy picture Ezzy · Mar 3, 2016 · Viewed 22.3k times · Source

I'm been trying to get into driver development (queue the "don't do that") I have been looking at this msdn page and after installing the WDK (Windows Driver Kit) 10 I am still unable to compile the example that they use on that page.

I have looked at other SO questions but I am unable to find the installed directory of the WDK. When I attempt to run the setup I am greeted by this: WDK Setup image

How can I solve this?

Answer

Sasha Zezulinsky picture Sasha Zezulinsky · Nov 10, 2016

You need to add WDK headers path to your vcxproj include directories:
vcxproj properties -> C/C++ -> General -> Additional Include Directories

C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\km\

P.S.: Make sure you install SDK 10 together with WDK 10.
P.P.S: Without SDK you will get Cannot open include file: 'ntdef.h' error