Cannot open include file: 'ntddk.h': No su

2019-02-19 09:26发布

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.

2条回答
爷、活的狠高调
2楼-- · 2019-02-19 09:50

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.

查看更多
做自己的国王
3楼-- · 2019-02-19 09:56

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.

查看更多
登录 后发表回答