WDK 8.1 with VS2013

Hi, All

I’m trying to build driver with VS2013 and WDK 8.1.
I have different property sheets for x86 and x64 targets.
I’m able to build x86 (Debug and Release), but x64 has one link error:

error LNK2019: unresolved external symbol __imp_KeInitializeSpinLock

x64 property sheet has macro: AMD64 and _WIN64

All pathes (include, lib) setted for Win7.
Does anybody know how i can fix this? Should i set up other env variable to build x64 driver?

xxxxx@mail.ru wrote:

I’m trying to build driver with VS2013 and WDK 8.1.
I have different property sheets for x86 and x64 targets.
I’m able to build x86 (Debug and Release), but x64 has one link error:

error LNK2019: unresolved external symbol __imp_KeInitializeSpinLock

x64 property sheet has macro: AMD64 and _WIN64

All pathes (include, lib) setted for Win7.
Does anybody know how i can fix this? Should i set up other env variable to build x64 driver?

So, did you build the property sheets on your own, rather than using the
defaults? If you look inside <wdm.h>, you’ll see that
KeInitializeSpinLock is either an external reference or a macro that
calls an inline function, depending on a complicated #ifdef. You are
apparently triggering the wrong one. You’re sure you don’t have X86
defined? Wat is NTDDI_VERSION set to?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.</wdm.h>

Hi, Tim

Thanks for your notes. It was my mistake and i didn’t define NTDDI_VERSION. Build fixed :slight_smile:

Thanks.

(my head hurts… You should not have to manually define NTDDI_VERSION to anything. If you do, your WDK isn’t installed correctly.)

Peter
OSR
@OSRDrivers