阅读:1593回复:0
紧急求救,驱动连接错误,不能生成sys文件,怎么处理?
我编译一个dnis的过滤驱动,在win2000下能编译成功,但在xp下,连接有错误,不能产生sys文件。我把log文件贴出来,
BUILD: Computing Include file dependencies: BUILD: Examining e:\intsfilter\filterdriver directory for files to compile. BUILD: e:\intsfilter\filterdriver: Interesting sources extension: zfilter.h BUILD: e:\intsfilter\filterdriver: Interesting sources extension: zfilter.h BUILD: e:\intsfilter\filterdriver: Interesting sources extension: zfilter.h Compiling e:\intsfilter\filterdriver directory ******************** 'nmake.exe /c BUILDMSG=Stop. -i NTTEST= UMTEST= NOLINK=1 NOPASS0=1 386=1' 1>cl -nologo /Tc -Ii386\ -I. -IE:\WINDDK\2600\inc -I..\INC -IE:\ProgramFiles\MicrosoftVisualStudio\VC98\Include -Iobjchk\i386 -IE:\WINDDK\2600\inc\wxp -IE:\WINDDK\2600\inc\wxp -IE:\WINDDK\2600\inc\ddk\wxp -IE:\WINDDK\2600\inc\ddk\wdm\wxp -IE:\WINDDK\2600\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=0x0600 -DWIN32_LEAN_AND_MEAN=1 -DDBG=1 -DDEVL=1 -D__BUILDMACHINE__=WinDDK -DFPO=0 -DNDEBUG -D_DLL=1 -DNDIS40 -DNDIS_MINIPORT_DRIVER -DNDIS40_MINIPORT /c /Zel /Zp8 /Gy -cbstring /W3 /WX /WX /Gz /QIfdiv- /QIf /G6 /Gi- /Gm- /GX- /GR- /GF -Z7 /Od /Oi /Oy- -FIE:\WINDDK\2600\inc\wxp\warning.h /Yuprecomp.h /Fpobjchk\i386\precomp.pch /YlZFILTER /Ycprecomp.h /Fpobjchk\i386\precomp.pch /Fo"E:\IntsFilter\FilterDriver\objchk\i386\precomp.obj" 1> 1>#include "precomp.h" 1> 1>pch_hdr.src 1> rc -l 409 -DSXS_ASSEMBLY_NAME="""""" -DSXS_ASSEMBLY_VERSION="""""" -DSXS_ASSEMBLY_LANGUAGE="""""" -DSXS_PROCESSOR_ARCHITECTURE="""x86""" -DSXS_TARGET="""ZFILTER.sys""" -DSYSTEM_COMPATIBLE_ASSEMBLY_NAME="""Microsoft.Windows.SystemCompatible""" -DLSYSTEM_COMPATIBLE_ASSEMBLY_NAME=L"""Microsoft.Windows.SystemCompatible""" -z "MS Sans Serif,Helv/MS Shell Dlg" -r -fo objchk\i386\zfilter.tmp -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=0x0600 -DWIN32_LEAN_AND_MEAN=1 -DDBG=1 -DDEVL=1 -D__BUILDMACHINE__=WinDDK -DFPO=0 -DNDEBUG -D_DLL=1 -DNDIS40 -DNDIS_MINIPORT_DRIVER -DNDIS40_MINIPORT -IE:\WINDDK\2600\inc -I..\INC -IE:\ProgramFiles\MicrosoftVisualStudio\VC98\Include -Iobjchk\i386 -IE:\WINDDK\2600\inc\wxp -IE:\WINDDK\2600\inc\wxp -IE:\WINDDK\2600\inc\ddk\wxp -IE:\WINDDK\2600\inc\ddk\wdm\wxp -IE:\WINDDK\2600\inc\crt .\zfilter.rc 1> 1> 1>cl -nologo -Ii386\ -I. -IE:\WINDDK\2600\inc -I..\INC -IE:\ProgramFiles\MicrosoftVisualStudio\VC98\Include -Iobjchk\i386 -IE:\WINDDK\2600\inc\wxp -IE:\WINDDK\2600\inc\wxp -IE:\WINDDK\2600\inc\ddk\wxp -IE:\WINDDK\2600\inc\ddk\wdm\wxp -IE:\WINDDK\2600\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=0x0600 -DWIN32_LEAN_AND_MEAN=1 -DDBG=1 -DDEVL=1 -D__BUILDMACHINE__=WinDDK -DFPO=0 -DNDEBUG -D_DLL=1 -DNDIS40 -DNDIS_MINIPORT_DRIVER -DNDIS40_MINIPORT /c /Zel /Zp8 /Gy -cbstring /W3 /WX /WX /Gz /QIfdiv- /QIf /G6 /Gi- /Gm- /GX- /GR- /GF -Z7 /Od /Oi /Oy- -FIE:\WINDDK\2600\inc\wxp\warning.h /Yuprecomp.h /Fpobjchk\i386\precomp.pch .\zfilter.c 1>zfilter.c 1>cl -nologo -Ii386\ -I. -IE:\WINDDK\2600\inc -I..\INC -IE:\ProgramFiles\MicrosoftVisualStudio\VC98\Include -Iobjchk\i386 -IE:\WINDDK\2600\inc\wxp -IE:\WINDDK\2600\inc\wxp -IE:\WINDDK\2600\inc\ddk\wxp -IE:\WINDDK\2600\inc\ddk\wdm\wxp -IE:\WINDDK\2600\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=0x0600 -DWIN32_LEAN_AND_MEAN=1 -DDBG=1 -DDEVL=1 -D__BUILDMACHINE__=WinDDK -DFPO=0 -DNDEBUG -D_DLL=1 -DNDIS40 -DNDIS_MINIPORT_DRIVER -DNDIS40_MINIPORT /c /Zel /Zp8 /Gy -cbstring /W3 /WX /WX /Gz /QIfdiv- /QIf /G6 /Gi- /Gm- /GX- /GR- /GF -Z7 /Od /Oi /Oy- -FIE:\WINDDK\2600\inc\wxp\warning.h /Yuprecomp.h /Fpobjchk\i386\precomp.pch .\protocol.c 1>protocol.c 1>cl -nologo -Ii386\ -I. -IE:\WINDDK\2600\inc -I..\INC -IE:\ProgramFiles\MicrosoftVisualStudio\VC98\Include -Iobjchk\i386 -IE:\WINDDK\2600\inc\wxp -IE:\WINDDK\2600\inc\wxp -IE:\WINDDK\2600\inc\ddk\wxp -IE:\WINDDK\2600\inc\ddk\wdm\wxp -IE:\WINDDK\2600\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=0x0600 -DWIN32_LEAN_AND_MEAN=1 -DDBG=1 -DDEVL=1 -D__BUILDMACHINE__=WinDDK -DFPO=0 -DNDEBUG -D_DLL=1 -DNDIS40 -DNDIS_MINIPORT_DRIVER -DNDIS40_MINIPORT /c /Zel /Zp8 /Gy -cbstring /W3 /WX /WX /Gz /QIfdiv- /QIf /G6 /Gi- /Gm- /GX- /GR- /GF -Z7 /Od /Oi /Oy- -FIE:\WINDDK\2600\inc\wxp\warning.h /Yuprecomp.h /Fpobjchk\i386\precomp.pch .\miniport.c 1>miniport.c 1>cl -nologo -Ii386\ -I. -IE:\WINDDK\2600\inc -I..\INC -IE:\ProgramFiles\MicrosoftVisualStudio\VC98\Include -Iobjchk\i386 -IE:\WINDDK\2600\inc\wxp -IE:\WINDDK\2600\inc\wxp -IE:\WINDDK\2600\inc\ddk\wxp -IE:\WINDDK\2600\inc\ddk\wdm\wxp -IE:\WINDDK\2600\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=0x0600 -DWIN32_LEAN_AND_MEAN=1 -DDBG=1 -DDEVL=1 -D__BUILDMACHINE__=WinDDK -DFPO=0 -DNDEBUG -D_DLL=1 -DNDIS40 -DNDIS_MINIPORT_DRIVER -DNDIS40_MINIPORT /c /Zel /Zp8 /Gy -cbstring /W3 /WX /WX /Gz /QIfdiv- /QIf /G6 /Gi- /Gm- /GX- /GR- /GF -Z7 /Od /Oi /Oy- -FIE:\WINDDK\2600\inc\wxp\warning.h /Yuprecomp.h /Fpobjchk\i386\precomp.pch .\filter.c 1>filter.c 1>cl -nologo -Ii386\ -I. -IE:\WINDDK\2600\inc -I..\INC -IE:\ProgramFiles\MicrosoftVisualStudio\VC98\Include -Iobjchk\i386 -IE:\WINDDK\2600\inc\wxp -IE:\WINDDK\2600\inc\wxp -IE:\WINDDK\2600\inc\ddk\wxp -IE:\WINDDK\2600\inc\ddk\wdm\wxp -IE:\WINDDK\2600\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=0x0600 -DWIN32_LEAN_AND_MEAN=1 -DDBG=1 -DDEVL=1 -D__BUILDMACHINE__=WinDDK -DFPO=0 -DNDEBUG -D_DLL=1 -DNDIS40 -DNDIS_MINIPORT_DRIVER -DNDIS40_MINIPORT /c /Zel /Zp8 /Gy -cbstring /W3 /WX /WX /Gz /QIfdiv- /QIf /G6 /Gi- /Gm- /GX- /GR- /GF -Z7 /Od /Oi /Oy- -FIE:\WINDDK\2600\inc\wxp\warning.h /Yuprecomp.h /Fpobjchk\i386\precomp.pch .\commonqueuemanagerexport.c 1>commonqueuemanagerexport.c 1> 1>Stop. Linking e:\intsfilter\filterdriver directory ******************** 'nmake.exe /c BUILDMSG=Stop. -i LINKONLY=1 NOPASS0=1 NTTEST= UMTEST= 386=1' 1> link -out:objchk\i386\ZFILTER.sys -machine:ix86 @C:\DOCUME~1\chenji\LOCALS~1\Temp\nma02272. 1>Microsoft (R) Incremental Linker Version 7.00.9210 1>Copyright (C) Microsoft Corporation. All rights reserved. 1> 1>-MERGE:_PAGE=PAGE 1>-MERGE:_TEXT=.text 1>-SECTION:INIT,d 1>-OPT:REF 1>-OPT:ICF 1>-IGNORE:4010,4037,4039,4065,4070,4078,4087,4089,4198,4221 1>-INCREMENTAL:NO 1>-FULLBUILD 1>/release 1>-NODEFAULTLIB 1>/WX 1>-debug:FULL 1>-debugtype:cv 1>-version:5.1 1>-osversion:5.1 1>/opt:nowin98 1>-STACK:0x40000,0x1000 1>-driver 1>-base:0x10000 1>-align:0x80 1>-subsystem:native,5.1 1>-entry:DriverEntry@8 1>-out:objchk\i386\ZFILTER.sys 1>objchk\i386\precomp.obj 1>objchk\i386\zfilter.res 1>objchk\i386\zfilter.obj 1>objchk\i386\protocol.obj 1>objchk\i386\miniport.obj 1>objchk\i386\filter.obj 1>objchk\i386\commonqueuemanagerexport.obj 1>objchk\i386\zfilter.obj 1>E:\WINDDK\2600\lib\wxp\i386\ntoskrnl.lib 1>E:\WINDDK\2600\lib\wxp\i386\hal.lib 1>E:\WINDDK\2600\lib\wxp\i386\wmilib.lib 1>E:\WINDDK\2600\lib\wxp\i386\ndis.lib 1>objchk\i386\zfilter.obj : warning LNK4042: object specified more than once; extras ignored 1>LINK : error LNK1218: warning treated as error; no output file generated 1>Skip Binplace: 1> 1>Stop. 就是最后几行显示没有生成sys文件,顺便把sources贴出来 TARGETNAME=ZFILTER TARGETPATH=obj TARGETTYPE=DRIVER TARGETLIBS=$(DDK_LIB_PATH)\ndis.lib C_DEFINES=$(C_DEFINES) -DNDIS40 -DNDIS_MINIPORT_DRIVER -DNDIS40_MINIPORT INCLUDES=$(BASEDIR)\inc;..\INC SOURCES= zFilter.c \ protocol.c \ miniport.c \ filter.c \ CommonQueueManagerExport.c \ zFilter.rc \ zFilter.h MSC_WARNING_LEVEL=/W3 /WX PRECOMPILED_INCLUDE=precomp.h PRECOMPILED_PCH=precomp.pch PRECOMPILED_OBJ=precomp.obj 我就用的winxp ddk编译环境,运行build -c 那位大侠能帮忙一下,万分感谢。 |
|
|