x64 Build error

Hi, all

I’m a newer on x64 driver developing.
I built my driver solution on win7 with ddkbuild.cmd as shown below.

ddkbuild -WLHX64 checked . -ceZ.

And I wrote TARGETLIBS such as

TARGETLIBS= $(TARGETLIBS) \
$(IFSKIT_LIB_PATH)\fltMgr.lib \
$(IFSKIT_LIB_PATH)\ksecdd.lib \
$(IFSKIT_LIB_PATH)\ntstrsafe.lib \
!IF “$(DDKBUILDENV)” == “chk” || “$(DDKBUILDENV)” == “checked”
…....\Debug$(CPU)\myTest.lib \
!ELSE
…....\bin$(CPU)\myTest.lib \
!ENDIF

I thought that “$CPU” would be “x64”, ans so i copied myTest.lib to …....\Debug\x64 folder.
But, when i build the solution, I found that it was “x86” and build failed.
This is a buid error string.

1>1>errors in directory e:\worktest\my_test\src\myfirst64
1>1>NMAKE : fatal error U1073: don’t know how to make ‘…....\Debug\x86\myTest.lib’

This is my question.

  1. Where is my mistake in SOURCES file ?.
  2. Why “$(CPU)” is “x86” ?

Any help would be appreciated.
Regards,

M.Baker

This is my best guess so early in the morning, based on sparse knowledge of BUILD:

  1. I think that ‘CPU’ is effectively == %PROCESSOR_ARCHITECTURE%, so it’s the architecture of your build system, not the target system for which your are building.

  2. I think that you could use ‘_BUILDARCH’ to get the target architecture, but it will report ‘amd64,’ not ‘x64.’

  3. That being said, I haven’t any idea of whether this is a good way to do what it appears that seek to do.

Good luck,

mm

Which version of DDKBuild?

http://www.hollistech.com/Resources/ddkbuild/ddkbuildhelp3_15.htm

-WLHA64 indicates development system uses the WHLBASE environment
variable to locate WDK versions 6000 or 6001 and
build AMD64 (X64) Vista or W2K8 binaries (optional.)
-WLH64 indicates development system uses the WHLBASE environment
variable to locate WDK versions 6000 or 6001 and build
IA64
W2K8 binaries (optional Untested.)

Anyway I don’t think you need WLHX64

wrote in message news:xxxxx@ntfsd…
> Hi, all
>
> I’m a newer on x64 driver developing.
> I built my driver solution on win7 with ddkbuild.cmd as shown below.
>
> ddkbuild -WLHX64 checked . -ceZ.
>
> And I wrote TARGETLIBS such as
>
> TARGETLIBS= $(TARGETLIBS) <br>> $(IFSKIT_LIB_PATH)\fltMgr.lib <br>> $(IFSKIT_LIB_PATH)\ksecdd.lib <br>> $(IFSKIT_LIB_PATH)\ntstrsafe.lib <br>> !IF “$(DDKBUILDENV)” == “chk” || “$(DDKBUILDENV)” == “checked”
> …....\Debug$(CPU)\myTest.lib <br>> !ELSE
> …....\bin$(CPU)\myTest.lib <br>> !ENDIF
>
> I thought that “$CPU” would be “x64”, ans so i copied myTest.lib to
> …....\Debug\x64 folder.
> But, when i build the solution, I found that it was “x86” and build
> failed.
> This is a buid error string.
>
> 1>1>errors in directory e:\worktest\my_test\src\myfirst64
> 1>1>NMAKE : fatal error U1073: don’t know how to make
> ‘…....\Debug\x86\myTest.lib’
>
>
> This is my question.
>
> 1. Where is my mistake in SOURCES file ?.
> 2. Why “$(CPU)” is “x86” ?
>
> Any help would be appreciated.
> Regards,
>
> M.Baker
>
>