Rasmi Ranjan Nayak
Rasmi Ranjan Nayak

Reputation: 11978

ntddk.h no such file or directory

I am using CODE::BLOCKS in windows XP. Tried to write a device driver. But right after creating a project, I got below error. I did below settings, but still getting the error as "ntddk.h no such file or directory". I have tried with all compilers (Project built option), but it is still there. Please help.

Created the project like:- File->New->Project->Kernel Mode Driver->Next->Next...

enter image description here

enter image description here

Upvotes: 1

Views: 4777

Answers (2)

Damon
Damon

Reputation: 70206

If, like most people using Code::Blocks on Windows, you use MingW-TDM (commonly detected as "GNU GCC Compiler" by Code::Blocks, and bundled with the "easy install" package), the file ntddk.h is located in the ddk subfolder of the system include folder.

Thus, you either have to add the ddk folder to the include search path, or write #include <ddk/ntddk.h>, either will work.

Upvotes: 4

msam
msam

Reputation: 4287

  1. Your list of compilers does not seem to include the DDK compiler
  2. Do you have the windows DDK installed?

NOTE: I know nothing about codeblocks but you will need the DDK compiler to compile windows drivers.

Upvotes: 0

Related Questions