Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WDK, intellisense and C: "command-line error: exception handling option can be used only when compiling C++ driver"

I want to write a kernel driver using Visual Studio 2015, so I installed the Windows 10 SDK and WDK alongside with VS 2015.

I created empty kernel driver project and main.c inside the project.

However, intellisense does not work and error list shows:

"command-line error: exception handling option can be used only when compiling C++ driver"

I suppose VS wants me to code my project on c++ but I don't want to code on c++. I hate casting when allocating memory etc. Are there any workaround for this?

Thanks

like image 211
Burak Tamtürk Avatar asked Oct 30 '22 22:10

Burak Tamtürk


1 Answers

C++ is usually not used in kernel mode drivers because it is not supported. I use some C++ in my drivers but that is the exception.

I see this same issue with VS 2015. Just create a blank C file in your project and you will see the intellisense (~) at the first column of the first line. This means intellisense is essentially broken for all C source files now.

like image 67
John Ziobro Avatar answered Nov 15 '22 05:11

John Ziobro