First thanks a lot to Doron Holan & Eliyas Yakub for your help.
I'm moved into WDK 6000 with KMDF 1.5 ,then the Common buffer allocation
works well ,if failed ,I can see the yellow "!" in my device manager.But
there is a small problem between my building progress.Followwing is the
error log:
*************************************
errors in directory l:\work\file4drvtest\kerneldrv\src
l:\work\file4drvtest\kerneldrv\src\generating code... : error '-f' is not
recognized as an internal or external command,
*************************************
And my build command window log:
***********************************
L:\Work\File4DrvTest\KernelDrv\Src>build -ceg
BUILD: Compile and Link for x86
BUILD: Loading e:\winddk\6000\build.dat...
BUILD: Computing Include file dependencies:
BUILD: Start time: Sat Jun 02 15:22:57 2007
BUILD: Examining l:\work\file4drvtest\kerneldrv\src directory for files to
compi
le.
l:\work\file4drvtest\kerneldrv\src - 7 source files (4,550 lines)
BUILD: Saving e:\winddk\6000\build.dat...
BUILD: Compiling l:\work\file4drvtest\kerneldrv\src directory
_NT_TARGET_VERSION SET TO WINXP
Precompiling - precomp.h
Compiling - adxdev.rc
Compiling - adxdev.c
Compiling - init.c
Compiling - isrdpc.c
Compiling - read.c
Compiling - write.c
Compiling - generating code...
Compiling - generating code...
errors in directory l:\work\file4drvtest\kerneldrv\src
l:\work\file4drvtest\kerneldrv\src\generating code... : error '-f' is not
recogn
ized as an internal or external command,
BUILD: Linking l:\work\file4drvtest\kerneldrv\src directory
_NT_TARGET_VERSION SET TO WINXP
Linking Executable - objfre_wxp_x86\i386\adx16xx.sys
BUILD: Finish time: Sat Jun 02 15:23:00 2007
BUILD: Done

11 files compiled - 1 Error - 4550 LPS
1 executable built
************************************
And the followwing is my "sources" file context:
************************************
TARGETNAME=Adx16xx
TARGETTYPE=DRIVER


KMDF_VERSION=1

INF_NAME=Adx16xx

MISCFILES=$(OBJ_PATH)\$(O)\$(INF_NAME).inf

NTTARGETFILES=

TARGETLIBS=$(TARGETLIBS) \
$(DDK_LIB_PATH)\ntstrsafe.lib

PRECOMPILED_INCLUDE=precomp.h
PRECOMPILED_PCH=precomp.pch
PRECOMPILED_OBJ=precomp.obj

#C_DEFINES = $(C_DEFINES) -DASSOC_WRITE_REQUEST_WITH_DMA_TRANSACTION=1

SOURCES= AdxDev.rc \
AdxDev.c \
Init.c \
IsrDpc.c \
Read.c \
Write.c

#
# Generate WPP tracing code
# $(SOURCES) -- run software preprocessor on files listed in SOURCES
# -km -- use kernel mode
# -func -- define function we'll use for tracing
# This would map all TraceEvents calls to
# DoTraceMessage.
#
RUN_WPP= $(SOURCES) \
-km \
-func:TraceEvents(LEVEL,FLAGS,MSG,...) \
-gen:{km-WdfDefault.tpl}*.tmh


*****************************************
Can you give some suggestions to aviod the error?
Thanks !

Re: WDK 6000 build env error "error '-f' is not recognized as an internal or external command" by Tim

Tim
Sat Jun 02 22:20:46 CDT 2007

?? <huang_wu1@163.com> wrote:

>First thanks a lot to Doron Holan & Eliyas Yakub for your help.
>I'm moved into WDK 6000 with KMDF 1.5 ,then the Common buffer allocation
>works well ,if failed ,I can see the yellow "!" in my device manager.But
>there is a small problem between my building progress.Followwing is the
>error log:
>*************************************
>errors in directory l:\work\file4drvtest\kerneldrv\src
>l:\work\file4drvtest\kerneldrv\src\generating code... : error '-f' is not
>recognized as an internal or external command,

There's not enough information here. Please post the whole .log file.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

RE: WDK 6000 build env error "error '-f' is not recognized as an inter by huangwu

huangwu
Sun Jun 03 06:05:00 CDT 2007

BUILD: Computing Include file dependencies:
BUILD: Examining l:\work\file4drvtest\kerneldrv\src directory for files to
compile.
before AssemblyIdentity_AfterReadAllSources
after AssemblyIdentity_AfterReadAllSources
skipping post pass 0 command
Compiling l:\work\file4drvtest\kerneldrv\src *************
'nmake.exe /nologo BUILDMSG=Stop. -i BUILD_PASS=PASS1 NOLINK=1 NOPASS0=1
MAKEDIR_RELATIVE_TO_BASEDIR=
MAKEDIR_LOWERCASE=l:\work\file4drvtest\kerneldrv\src'
BUILDMSG: _NT_TARGET_VERSION SET TO WINXP
cl.exe /Ii386 /I. /Il:\work\file4drvtest\kerneldrv\src\objfre_wxp_x86\i386
/IE:\WinDDK\6000\inc\api /IE:\WinDDK\6000\inc\api /IE:\WinDDK\6000\inc\ddk
/IE:\WinDDK\6000\inc\ddk /IE:\WinDDK\6000\inc\wdf\kmdf\10
/IE:\WinDDK\6000\inc\crt /D_X86_=1 /Di386=1 /DSTD_CALL /DCONDITION_HANDLING=1
/DNT_INST=0 /DWIN32=100 /D_NT1X_=100 /DWINNT=1 /D_WIN32_WINNT=0x0501
/DWINVER=0x0501 /D_WIN32_IE=0x0603 /DWIN32_LEAN_AND_MEAN=1 /DDEVL=1
/D__BUILDMACHINE__=WinDDK /DFPO=0 /DNDEBUG /D_DLL=1 /DNDEBUG
/DNTDDI_VERSION=0x05010200 /DRUN_WPP /c /Zc:wchar_t- /Zl /Zp8 /Gy /Gm-
-cbstring /W3 /WX /Gz /hotpatch /EHs-c- /GR- /GF /GS /Zi /Oxs /Oy- /Zi
/Fdl:\work\file4drvtest\kerneldrv\src\objfre_wxp_x86\i386\
-DKMDF_MAJOR_VERSION=01 -DKMDF_MINOR_VERSION=005
/FIE:\WinDDK\6000\inc\api\warning.h /Yuprecomp.h
/Fpobjfre_wxp_x86\i386\precomp.pch /YlAdx16xx /Ycprecomp.h
/Fpobjfre_wxp_x86\i386\precomp.pch /Fo"objfre_wxp_x86\i386\precomp.obj" /Tc

#include "precomp.h"

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.220 for
80x86
Copyright (C) Microsoft Corporation. All rights reserved.

cl
/Ii386
/I.
/Il:\work\file4drvtest\kerneldrv\src\objfre_wxp_x86\i386
/IE:\WinDDK\6000\inc\api
/IE:\WinDDK\6000\inc\api
/IE:\WinDDK\6000\inc\ddk
/IE:\WinDDK\6000\inc\ddk
/IE:\WinDDK\6000\inc\wdf\kmdf\10
/IE:\WinDDK\6000\inc\crt
/D_X86_=1
/Di386=1

/DSTD_CALL
/DCONDITION_HANDLING=1


/DNT_INST=0
/DWIN32=100
/D_NT1X_=100
/DWINNT=1
/D_WIN32_WINNT=0x0501
/DWINVER=0x0501
/D_WIN32_IE=0x0603



/DWIN32_LEAN_AND_MEAN=1
/DDEVL=1
/D__BUILDMACHINE__=WinDDK
/DFPO=0

/DNDEBUG
/D_DLL=1
/DNDEBUG

/DNTDDI_VERSION=0x05010200
/DRUN_WPP




/c
/Zc:wchar_t-
/Zl
/Zp8
/Gy
/Gm-
-cbstring
/W3
/WX
/Gz


/hotpatch
/EHs-c-

/GR-
/GF
/GS
/Zi
/Oxs

/Oy-
/Zi
/Fdl:\work\file4drvtest\kerneldrv\src\objfre_wxp_x86\i386\


-DKMDF_MAJOR_VERSION=01
-DKMDF_MINOR_VERSION=005
/FIE:\WinDDK\6000\inc\api\warning.h

/YlAdx16xx /Ycprecomp.h /Fpobjfre_wxp_x86\i386\precomp.pch
/Fo"objfre_wxp_x86\i386\precomp.obj"

pch_hdr.src
rc -l 409 -DSXS_PROCESSOR_ARCHITECTURE="""x86"""
-DSXS_TARGET="""Adx16xx.sys"""
-DSYSTEM_COMPATIBLE_ASSEMBLY_NAME="""Microsoft.Windows.SystemCompatible"""
-DLSYSTEM_COMPATIBLE_ASSEMBLY_NAME=L"""Microsoft.Windows.SystemCompatible"""
-DSXS_ASSEMBLY_VERSION="""""" /r /fo objfre_wxp_x86\i386\adxdev.res
/D_X86_=1 /Di386=1 /DSTD_CALL /DCONDITION_HANDLING=1 /DNT_INST=0
/DWIN32=100 /D_NT1X_=100 /DWINNT=1 /D_WIN32_WINNT=0x0501 /DWINVER=0x0501
/D_WIN32_IE=0x0603 /DWIN32_LEAN_AND_MEAN=1 /DDEVL=1
/D__BUILDMACHINE__=WinDDK /DFPO=0 /DNDEBUG /D_DLL=1 /DNDEBUG
/DNTDDI_VERSION=0x05010200 /DRUN_WPP
/Il:\work\file4drvtest\kerneldrv\src\objfre_wxp_x86\i386
/IE:\WinDDK\6000\inc\api /IE:\WinDDK\6000\inc\api /IE:\WinDDK\6000\inc\ddk
/IE:\WinDDK\6000\inc\ddk /IE:\WinDDK\6000\inc\wdf\kmdf\10
/IE:\WinDDK\6000\inc\crt .\adxdev.rc
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation. All rights reserved.

cl.exe @l:\work\file4drvtest\kerneldrv\src\objfre_wxp_x86\i386\cl.rsp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.220 for
80x86
Copyright (C) Microsoft Corporation. All rights reserved.

cl /Fo"l:\work\file4drvtest\kerneldrv\src\objfre_wxp_x86\i386/"
/FC


/Ii386
/I.
/Il:\work\file4drvtest\kerneldrv\src\objfre_wxp_x86\i386
/IE:\WinDDK\6000\inc\api
/IE:\WinDDK\6000\inc\api
/IE:\WinDDK\6000\inc\ddk
/IE:\WinDDK\6000\inc\ddk
/IE:\WinDDK\6000\inc\wdf\kmdf\10
/IE:\WinDDK\6000\inc\crt
/D_X86_=1
/Di386=1

/DSTD_CALL
/DCONDITION_HANDLING=1


/DNT_INST=0
/DWIN32=100
/D_NT1X_=100
/DWINNT=1
/D_WIN32_WINNT=0x0501
/DWINVER=0x0501
/D_WIN32_IE=0x0603



/DWIN32_LEAN_AND_MEAN=1
/DDEVL=1
/D__BUILDMACHINE__=WinDDK
/DFPO=0

/DNDEBUG
/D_DLL=1
/DNDEBUG

/DNTDDI_VERSION=0x05010200
/DRUN_WPP




/c
/Zc:wchar_t-
/Zl
/Zp8
/Gy
/Gm-
-cbstring
/W3
/WX
/Gz


/hotpatch
/EHs-c-

/GR-
/GF
/GS
/Zi
/Oxs

/Oy-
/Zi
/Fdl:\work\file4drvtest\kerneldrv\src\objfre_wxp_x86\i386\


-DKMDF_MAJOR_VERSION=01
-DKMDF_MINOR_VERSION=005
/FIE:\WinDDK\6000\inc\api\warning.h

/Yuprecomp.h
/Fpobjfre_wxp_x86\i386\precomp.pch
.\adxdev.c .\init.c .\isrdpc.c .\read.c .\write.c

adxdev.c
init.c
isrdpc.c
read.c
write.c
Generating Code...
copy .\Adx16xx.inx
l:\work\file4drvtest\kerneldrv\src\objfre_wxp_x86\i386\Adx16xx.inf
1 file(s) copied.
-f l:\work\file4drvtest\kerneldrv\src\objfre_wxp_x86\i386\Adx16xx.inf -a
x86 -v 1.0.0.0
'-f' is not recognized as an internal or external command,
errors in directory l:\work\file4drvtest\kerneldrv\src
l:\work\file4drvtest\kerneldrv\src\generating code... : error '-f' is not
recognized as an internal or external command,
operable program or batch file.
Linking l:\work\file4drvtest\kerneldrv\src *************
'nmake.exe /nologo BUILDMSG=Stop. -i BUILD_PASS=PASS2 LINKONLY=1 NOPASS0=1
MAKEDIR_RELATIVE_TO_BASEDIR=
MAKEDIR_LOWERCASE=l:\work\file4drvtest\kerneldrv\src'
BUILDMSG: _NT_TARGET_VERSION SET TO WINXP
link.exe /out:objfre_wxp_x86\i386\Adx16xx.sys /machine:ix86
@C:\Users\JO200704\AppData\Local\Temp\nm5E1E.tmp
Microsoft (R) Incremental Linker Version 8.00.50727.220
Copyright (C) Microsoft Corporation. All rights reserved.

/MERGE:_PAGE=PAGE
/MERGE:_TEXT=.text
/SECTION:INIT,d
/OPT:REF
/OPT:ICF
/IGNORE:4198,4010,4037,4039,4065,4070,4078,4087,4089,4221
/INCREMENTAL:NO
/FULLBUILD
/release
/NODEFAULTLIB
/WX
/debug
/debugtype:cv
/version:6.0
/osversion:6.0
/functionpadmin:5
/safeseh
/debug
/debugtype:cv,fixup
/pdbcompress
/STACK:0x40000,0x1000
/driver
/base:0x10000
/align:0x80 /stub:e:\winddk\6000\lib\wxp\stub512.com
/subsystem:native,5.01
/entry:FxDriverEntry@8
/out:objfre_wxp_x86\i386\Adx16xx.sys
objfre_wxp_x86\i386\precomp.obj
objfre_wxp_x86\i386\adxdev.res
objfre_wxp_x86\i386\adxdev.obj
objfre_wxp_x86\i386\init.obj
objfre_wxp_x86\i386\isrdpc.obj
objfre_wxp_x86\i386\read.obj
objfre_wxp_x86\i386\write.obj
e:\winddk\6000\lib\wxp\i386\BufferOverflowK.lib
e:\winddk\6000\lib\wxp\i386\ntoskrnl.lib
e:\winddk\6000\lib\wxp\i386\hal.lib
e:\winddk\6000\lib\wxp\i386\wmilib.lib
E:\WinDDK\6000\lib\wdf\kmdf\i386\10\WdfLdr.lib
E:\WinDDK\6000\lib\wdf\kmdf\i386\10\WdfDriverEntry.lib
e:\winddk\6000\lib\wxp\i386\ntstrsafe.lib
e:\winddk\6000\lib\wxp\i386\sehupd.lib



here is the whole log file.
Thanks for you reply. Have a nice weekend. :-)

Re: WDK 6000 build env error "error '-f' is not recognized as an inter by Eliyas

Eliyas
Sun Jun 03 11:49:25 CDT 2007

Can you show us the content of makefile.inc?

> copy .\Adx16xx.inx
> l:\work\file4drvtest\kerneldrv\src\objfre_wxp_x86\i386\Adx16xx.inf
> 1 file(s) copied.
> -f l:\work\file4drvtest\kerneldrv\src\objfre_wxp_x86\i386\Adx16xx.inf -a
> x86 -v 1.0.0.0
> '-f' is not recognized as an internal or external command,
> errors in directory l:\work\file4drvtest\kerneldrv\src
> l:\work\file4drvtest\kerneldrv\src\generating code... : error '-f' is not
> recognized as an internal or external command,
> operable program or batch file.

-Eliyas



RE: WDK 6000 build env error "error '-f' is not recognized as an inter by huangwu

huangwu
Sun Jun 03 22:25:00 CDT 2007

_LNG=$(LANGUAGE)
_INX=.
STAMP=$(STAMPINF_PATH) -f $@ -a $(_BUILDARCH) -v 1.0.0.0

$(OBJ_PATH)\$(O)\$(INF_NAME).inf: $(_INX)\$(INF_NAME).inx
copy $(_INX)\$(@B).inx $@
$(STAMP)
**********************************************************
From the makefile.inc,I find the "-f" ,but could you please tell me what is
its function?Seems the action to generate the inf file is just to copy and
rename ,I mean the adx16xx.inx match the adx16xx.inf in content.
Thanks for you step by step helping,this give me grate help not just in this
project but also in all my future projects. :)

Re: WDK 6000 build env error "error '-f' is not recognized as an by Mark

Mark
Mon Jun 04 15:33:21 CDT 2007

huangwu wrote:
> _LNG=$(LANGUAGE)
> _INX=.
> STAMP=$(STAMPINF_PATH) -f $@ -a $(_BUILDARCH) -v 1.0.0.0
>
> $(OBJ_PATH)\$(O)\$(INF_NAME).inf: $(_INX)\$(INF_NAME).inx
> copy $(_INX)\$(@B).inx $@
> $(STAMP)
> **********************************************************
> From the makefile.inc,I find the "-f" ,but could you please tell me what is
> its function?Seems the action to generate the inf file is just to copy and
> rename ,I mean the adx16xx.inx match the adx16xx.inf in content.
> Thanks for you step by step helping,this give me grate help not just in this
> project but also in all my future projects. :)

STAMPINF_PATH is NULL this the stamp macro resolves to "-f $@ -a
$(_BUILDARCH) -v 1.0.0.0'

This of course begs the question of why STAMPINF_PATH is null. And the
answer is that you probably copied an old project from a prior ddk and
you do not need $STAMPINF_PATH). Just replace it with stampinf:

STAMP=stampinf -f $@ -d date -a $(_BUILDARCH) -v 1.0.0.0


Re: WDK 6000 build env error "error '-f' is not recognized as an by huang_wu1

huang_wu1
Mon Jun 04 20:29:38 CDT 2007

Thanks for your help ,Mark Roddy ,and all the other helper.My problem
was solved.