error LNK2001: unresolved external symbol _WdfFunctions error LNK2001: unresolved ex

Helllo,

I am trying to create a KMDF mouse filter driver. I have picked up the keyboard filter driver from the WinDDK examples and changed it. I have removed the ioctls and I’m just trying to build it but it gives the following exception:

error LNK2001: unresolved external symbol _WdfFunctions
error LNK2001: unresolved external symbol _WdfDriverGlobals error LNK2001: unresolved external symbol _WdfDriverGlobals

If its required I can post the code as well.
Could you please help.

Indumathi.

xxxxx@tenet.res.in wrote:

Helllo,

I am trying to create a KMDF mouse filter driver. I have picked up the keyboard filter driver from the WinDDK examples and changed it. I have removed the ioctls and I’m just trying to build it but it gives the following exception:

error LNK2001: unresolved external symbol _WdfFunctions
error LNK2001: unresolved external symbol _WdfDriverGlobals error LNK2001: unresolved external symbol _WdfDriverGlobals

If its required I can post the code as well.
Could you please help.

Indumathi.

Try to start over from the original sample.
Make small changes one by one, so when it breaks, you’ll know exactly
what caused it.

Good luck,
–PA

Thank You. I could resolve the error by making small changes.
Could you also let me know about the device id that is used in the .h file.

Ok so this is a linker error. This is generally called when it cannot find a lib. Can you post the contents of your sources file please?

xxxxx@tenet.res.in wrote:

Could you also let me know about the device id that is used in the .h file.

??
Please see the WDK documentation,
Device Installation -> Design Guide -> Device identification strings

Does this answer your question?

–PA

It seems pretty clear to me that you have done one of the following [or something close enough I don’t intend to parse words]:

* removed the macros from the sources file that identify this as a KMDF driver (but somehow have managed to make the code find the headers, whose paths are established by the same macro)
* you are not using WDK build in the belief you have makfile.* figured out, and missed some of the new WDF glue we added.
* since you have not specified your environment- perhaps you are using DDK (pre-Vista) and not WDK (Vista or later), and you can’t build WDF drivers there (except WDF 1.0 and 1.1, which were add-ons that are no longer supported or available for download). In this event, something still must have been done to locate the proper header files…

Those symbols are defined in a KMDF support library, which you are not linking. Since those are the only messages emitted, you also are not specifying the correct entry point [or there would be even more messages emitted]- so my telling you the name of the library won’t help. You need a proper build environment, and if you have one, then you need to use the correct macros to identify the driver being built as a KMDF driver.

-----Original Message-----



Helllo,

I am trying to create a KMDF mouse filter driver. I have picked up the keyboard filter driver from the WinDDK examples and changed it. I have removed the ioctls and I'm just trying to build it but it gives the following exception:

error LNK2001: unresolved external symbol _WdfFunctions
error LNK2001: unresolved external symbol _WdfDriverGlobals error LNK2001: unresolved external symbol _WdfDriverGlobals

If its required I can post the code as well.
Could you please help.

Indumathi.

---

Link both the libraries : WdfDriverEntry.lib and WdfLdr.lib

Given that this post was from 13 years ago, I suspect the problem has been solved.

(Thread locked)

Peter