Search code examples
driverdevice-driverwdk

error LNK2001: unresolved external symbol __iob_func


I am trying to compile a windows driver using winddk. I am keep getting the mentioned error. I have already added USE_LIBCMT = 1 to my SOURCE file. However, I m still getting the same error. Can anyone tell me what I must be missing.

Thanks,


Solution

  • You certainly don't want to USE_LIBCMT from a (kernel?!) driver. Windows kernel drivers don't have any kind of C stdio.h functions available, other than a very limited set of C runtime functions for basic string operations (check ntoskrnl.exe exports).

    Of course there is the chance that you are writing a user mode driver (WDF), but even then you don't really want to do what you are trying.

    The complete SOURCES file and some code snippets would be appreciated, though. Of course you can leave out source and header file names. Relevant are mostly the defines and the type of driver you are trying to build.