WinDbg Extension dll does not compile (three link errors) RRS feed

  • Question

  • As recently as March 12, I had no trouble creating, compiling and linking a WinDbg extension based on the Debugging Tools for Windows include and lib directories. However, I have just spent 16 hours seeing new and different failures.  Part of the problem is that the required paths include both a dbgeng.h file (WinDbg\inc) and a DbgEng.h file (in the WDK um directory where things like windows.h reside).  Visual Studio is unable to distinguish between them. I did get past that, but I still end up with link failures because the linker cannot map DebugCreate to a library or source reference.  DebugCreate is declared but according to Visual Studio (Pro version) there is no actual implementation that constitutes a definition.  The two device classes I am working with (based on past experience) are video and ndis, but there is nothing at the point of failure that has used anything device specific.  I am building on a Win 10 system with the most recent version, and the most recent WDK/SDK combination (except for those that require VS 2017). 

    Note that I am not doing this using the samples from the Debugging Tools for Windows x64\sdk\samples, as these are makefile based and it was not necessary the last time -- I have always done this with the Visual Studio template.  I am only doing kernel at the moment (since that is where I spend most of my time.

    I have a meeting in about 45 minutes.  Afterward, I will be continuing on this even if I don't hear from anyone, but I would greatly appreciate any suggestions for resolving this.  Probably will start by shifting back to the Win 10 version I was using in March. 


    Friday, May 19, 2017 2:30 PM

All replies

  • Please post the compile and linker error output you are getting

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, May 19, 2017 3:48 PM
  • The current sdk samples for the debugging tools are available as vcxproj files.

    To fix a linker error for DebugCreate, you need to include dbgeng.lib as an additional link dependency.

    Friday, May 19, 2017 5:59 PM