Abdul jalil
Abdul jalil

Reputation: 124

Driver Bulid error for 64bit os on Vistual Studio 2005

i am using Visual studio 2005 with WDK 7600.16385.1.i am compiling User mode Printer driver it will successfully build when i select "Win32" for platform but when i build this driver for "x64" i get compiler Error tha is given below

C:\WinDDK\7600.16385.1\inc\api\winnt.h(135) : fatal error C1189: #error : "No Target Architecture"

i have checked winnt.h and code is given below

    #if defined(_WIN64)

#if defined(_AMD64_)
#define PROBE_ALIGNMENT( _s ) TYPE_ALIGNMENT( DWORD )
#elif defined(_IA64_)
#define PROBE_ALIGNMENT( _s ) (TYPE_ALIGNMENT( _s ) > TYPE_ALIGNMENT( DWORD ) ? \
                              TYPE_ALIGNMENT( _s ) : TYPE_ALIGNMENT( DWORD ))
#else
#error "No Target Architecture"
#endif

#define PROBE_ALIGNMENT32( _s ) TYPE_ALIGNMENT( DWORD )

#else

and C/C++ command line switches is given below (copied from project "property->C/C++->Command Line")

/Od /Oi /I "..\inc" /I "C:\WinDDK\WXP\inc\wxp" /I "C:\WinDDK\WXP\inc\crt" /I "C:\WinDDK\WXP\inc" /D "_X86_=1" /D "i386=1" /D "STD_CALL" /D "CONDITION_HANDLING=1" /D "WIN32_LEAN_AND_MEAN=1" /D "NT_UP=1" /D "NT_INST=0" /D "WIN32=100" /D "_NT1X_=100" /D "_WIN32_WINNT=0X0500" /D "WINNT" /D "DEVL=1" /D "FPO=0" /D "UNICODE" /D "_IDWBUILD" /D "USERMODE_DRIVER" /D "DBG=1" /D "DEBUG" /D "RDRDBG" /D "SRVDBG" /GF /FD /MTd /Zp8 /GS- /Gy /Fo".\Debug/" /Fd"x64\Debug\vc80.pdb" /W1 /nologo /c /Z7 /Gz /TP /FI "..\inc\warning.h" /errorReport:prompt

Please help me as soon as possible

Upvotes: 1

Views: 964

Answers (2)

Sunny Kalsi
Sunny Kalsi

Reputation: 11

My best guess would be to define _AMD_64_ in the project properties (assuming you're using x64 and not ia64)

Upvotes: 1

snoone
snoone

Reputation: 5499

Why are you trying to build this from within Visual Studio? Using the WDK and the standard build procedure (i.e. sources/makefile and build).

-scott

Upvotes: 0

Related Questions