Setting up eclipse for windows driver development

2019-04-10 15:26发布

问题:

I am trying to write a user-mode windows(XP, Vista & 7) virtual printer driver using WDK 7.1.0 . I plan to use eclipse IDE for development, so wanted to know if I can set it up for the same. I am looking to do following:-

1) Eclipse to recognize win32 apis (C and C++) and hence provide features like autocompletion for its function names

2) Eclipse to use compiler provided with WDK

3) Debug the code through eclipse (Not sure if this is possible or not)

OR would you suggest some other development environment for windows driver development ?

回答1:

Definitely you should use MS Visual Studio with VisualDDK addon.

It allows you to compile/debug even kernel mode drivers local or remotely.



回答2:

  1. Run Eclipse from build environment that you need (free or checked with needed architecture)
  2. Create project or import C/C++ / Existing code as makefile project. Select GNU Toolchain.
  3. Properties -> Builders -> New -> Environment -> Select, select all variables, mark "add to all configurations", select "replace native environment with specified on". On the Main tab select full path to build.exe of the selected build environment. Select your project directory in workspace as "working directory"
  4. Properties -> C/C++ Build -> On Bulder Settings tab remove "Use default build command" flag and type "build"
  5. Properties -> C/C++ Build -> Tool Chain Editor -> Select Tools. Personaly I selected msvc compilers.
  6. Properties -> C/C++ General -> Paths and Symbols -> select includes that you need including WDK ones
  7. Enjoy