I am getting this weird error:
Linking Executable - i386\sysproc.sys
1>errors in directory c:\work\driver\wininternals\timer
1>c:\work\driver\wininternals\timer\ntoskrnl.lib(ntoskrnl.exe) : error LNK2005:xxxxx@4 already defined in driver.obj
1>c:\work\driver\wininternals\timer\i386\sysproc.sys : error LNK1169: one or more multiply defined symbols found
The cause is that I have 2 .cpp files each calling KeInitializeSpinLock() but one includes <wdm.h> while the other includes <ntddk.h>.
How do I resolve the issue aparting from replacing all <wdm.h> includes to <ntddk.h>?</ntddk.h></wdm.h></ntddk.h></wdm.h>