I have been stuck on an issue with building my driver due to a linker error. The driver has built in the past, but since then I have reset my PC and updated to Windows 10 Version 20H2. (It previously built on 1909 with no issues.)
I downloaded the latest Windows SDK + WDK from https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk (WDK for Windows 10, version 2004)
The error I get when building is:
1>Main.obj : error LNK2019: unresolved external symbol __acrt_iob_func referenced in function printf
1>Main.obj : error LNK2019: unresolved external symbol __stdio_common_vswprintf referenced in function _vswprintf_c_l
1>Main.obj : error LNK2019: unresolved external symbol __stdio_common_vfprintf referenced in function _vfprintf_l
This is triggered by using using printf and swprintf.
Just in case this matters, the main driver code is in a .cpp file, and the includes are in a .h file.
Could anyone help me figure out how to fix this? Thanks.