Cannot open include file: 'ntddk.h': No such file or directory
Asked Answered
S

3

2

I am getting this error when I am trying to build my driver:

Driver.cpp(7): fatal error C1083: Cannot open include file: 'ntddk.h': No such file or directory

I am using Visual Studio 2012 with WDK 8.1 installed (I have not cinfigured anything in VS).

Any help is appreciated.

Sluiter answered 26/10, 2013 at 15:1 Comment(0)
C
3

Go to project properties -> C/C++ -> General, and add ddk headers path to Additional Include Directories tab. It should be sth like $(WDKPATH)\inc\ddk where $(WDKPATH) is ofc a directory where You have installed WDK.

Countercurrent answered 26/10, 2013 at 18:35 Comment(0)
C
2

You need Visual Studio 2013 for WDK 8.1

Quote :

Important: Before installing WDK 8.1 Update, you need to install Visual Studio 2013. See the Visual Studio links on this page.

Cletis answered 27/11, 2014 at 18:17 Comment(0)
M
0

I am using Visual Studio 2017 and I had the same issue when trying to compile a driver.

This solution help me:
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\
Muttonchops answered 28/7, 2021 at 6:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.