wanyinghui
驱动牛犊
驱动牛犊
  • 注册日期2002-04-23
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分7分
  • 威望12点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1608回复:2

求助:VC编译passthru出错

楼主#
更多 发布于:2005-06-22 16:00
  利用SrcToDsp将passthru转换成VC的工程,设置DDK工作路径,编译工程,出现下面的错误:
--------------------Configuration: passthru - Win32 Checked--------------------
Compiling...
miniport.c
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\passthru.h(313) : error C2146: syntax error : missing ')' before identifier 'DevicePnPEvent'
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\passthru.h(313) : error C2081: 'NDIS_DEVICE_PNP_EVENT' : name in formal parameter list illegal
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\passthru.h(313) : error C2061: syntax error : identifier 'DevicePnPEvent'
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\passthru.h(313) : error C2059: syntax error : ';'
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\passthru.h(313) : error C2059: syntax error : ','
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\passthru.h(316) : error C2059: syntax error : ')'
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\miniport.c(220) : error C2065: 'PNDIS_PACKET_STACK' : undeclared identifier
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\miniport.c(220) : error C2146: syntax error : missing ';' before identifier 'pStack'
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\miniport.c(220) : error C2065: 'pStack' : undeclared identifier
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\miniport.c(221) : error C2275: 'BOOLEAN' : illegal use of this type as an expression
        d:\NTDDK\inc\ntdef.h(1046) : see declaration of 'BOOLEAN'
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\miniport.c(221) : error C2146: syntax error : missing ';' before identifier 'Remaining'
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\miniport.c(221) : error C2065: 'Remaining' : undeclared identifier
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\miniport.c(227) : error C4013: 'NdisIMGetCurrentPacketStack' undefined; assuming extern returning int
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\miniport.c(427) : error C2146: syntax error : missing ';' before identifier 'pStack'
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\miniport.c(428) : error C2275: 'BOOLEAN' : illegal use of this type as an expression
        d:\NTDDK\inc\ntdef.h(1046) : see declaration of 'BOOLEAN'
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\miniport.c(428) : error C2146: syntax error : missing ';' before identifier 'Remaining'
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\miniport.c(1128) : error C4013: 'NdisGetPoolFromPacket' undefined; assuming extern returning int
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\miniport.c(1128) : warning C4047: '!=' : 'int ' differs in levels of indirection from 'void *'
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\miniport.c(1335) : error C4013: 'NdisCancelSendPackets' undefined; assuming extern returning int
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\miniport.c(1343) : error C2146: syntax error : missing ')' before identifier 'DevicePnPEvent'
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\miniport.c(1343) : error C2081: 'NDIS_DEVICE_PNP_EVENT' : name in formal parameter list illegal
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\miniport.c(1343) : error C2061: syntax error : identifier 'DevicePnPEvent'
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\miniport.c(1343) : error C2059: syntax error : ';'
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\miniport.c(1343) : error C2059: syntax error : ','
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\miniport.c(1346) : error C2059: syntax error : ')'
passthru.c
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\passthru.h(313) : error C2146: syntax error : missing ')' before identifier 'DevicePnPEvent'
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\passthru.h(313) : error C2081: 'NDIS_DEVICE_PNP_EVENT' : name in formal parameter list illegal
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\passthru.h(313) : error C2061: syntax error : identifier 'DevicePnPEvent'
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\passthru.h(313) : error C2059: syntax error : ';'
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\passthru.h(313) : error C2059: syntax error : ','
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\passthru.h(316) : error C2059: syntax error : ')'
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\passthru.c(123) : error C2039: 'CancelSendPacketsHandler' : is not a member of '_NDIS40_MINIPORT_CHARACTERISTICS'
        D:\项目\加密卡\文档资料\网络驱动\原码\passthru\ndis.h(9453) : see declaration of '_NDIS40_MINIPORT_CHARACTERISTICS'
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\passthru.c(124) : error C2039: 'PnPEventNotifyHandler' : is not a member of '_NDIS40_MINIPORT_CHARACTERISTICS'
        D:\项目\加密卡\文档资料\网络驱动\原码\passthru\ndis.h(9453) : see declaration of '_NDIS40_MINIPORT_CHARACTERISTICS'
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\passthru.c(124) : error C2065: 'MPDevicePnPEvent' : undeclared identifier
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\passthru.c(125) : error C2039: 'AdapterShutdownHandler' : is not a member of '_NDIS40_MINIPORT_CHARACTERISTICS'
        D:\项目\加密卡\文档资料\网络驱动\原码\passthru\ndis.h(9453) : see declaration of '_NDIS40_MINIPORT_CHARACTERISTICS'
protocol.c
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\passthru.h(313) : error C2146: syntax error : missing ')' before identifier 'DevicePnPEvent'
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\passthru.h(313) : error C2081: 'NDIS_DEVICE_PNP_EVENT' : name in formal parameter list illegal
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\passthru.h(313) : error C2061: syntax error : identifier 'DevicePnPEvent'
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\passthru.h(313) : error C2059: syntax error : ';'
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\passthru.h(313) : error C2059: syntax error : ','
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\passthru.h(316) : error C2059: syntax error : ')'
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\protocol.c(783) : error C4013: 'NdisGetPoolFromPacket' undefined; assuming extern returning int
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\protocol.c(783) : warning C4047: '=' : 'void *' differs in levels of indirection from 'int '
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\protocol.c(1145) : error C4013: 'NdisIMGetCurrentPacketStack' undefined; assuming extern returning int
D:\项目\加密卡\文档资料\网络驱动\原码\passthru\protocol.c(1273) : error C4013: 'NdisIMNotifyPnPEvent' undefined; assuming extern returning int
Generating Code...
Error executing cl.exe.

passthru.sys - 43 error(s), 2 warning(s)
The following environment variables were not found
$(C_DEFINES)

感觉错误与NDIS的相关宏定义等有关,另外The following environment variables were not found
$(C_DEFINES)
是什么意思??
cyliu
论坛版主
论坛版主
  • 注册日期2003-06-13
  • 最后登录2014-04-11
  • 粉丝5
  • 关注0
  • 积分1238分
  • 威望2531点
  • 贡献值0点
  • 好评度577点
  • 原创分14分
  • 专家分10分
沙发#
发布于:2005-06-22 16:09
看看用vc编译驱动的方法.你的可能没有配置环境.
走走看看开源好 Solaris vs Linux
wanyinghui
驱动牛犊
驱动牛犊
  • 注册日期2002-04-23
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分7分
  • 威望12点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2005-06-22 16:28
在哪里配置呀?
游客

返回顶部