Tech Support > Microsoft Windows > Drivers > compile error
compile error
Posted by Puneet on April 25th, 2004


Hi all,

I have included ntddndis.h in my user mode code and trying yo compile this,
but the error is

--------------------Configuration: Project_V12 - Win32
Debug--------------------
Compiling...
DriverCalls.cpp
c:\program files\microsoft sdk\include\ntddndis.h(79) : error C2146: syntax
error : missing ';' before identifier 'NDIS_OID'
c:\program files\microsoft sdk\include\ntddndis.h(79) : fatal error C1004:
unexpected end of file found
Error executing cl.exe.
Creating browse info file...
BSCMAKE: error BK1506 : cannot open file '.\Debug\DriverCalls.sbr': No such
file or directory
Error executing bscmake.exe.

Project_V12.exe - 3 error(s), 0 warning(s)
----------------------------------------------------------------------------
----
It shows me error at

typedef ULONG NDIS_OID, *PNDIS_OID;

can you plz help me out to sort this error.

regards,
Puneet


Posted by Puneet on April 25th, 2004


Hi,

I guess i solved it by including "ntddndis.h" in "stdafx.h", but again some
more errors are cropping up

--------------------Configuration: PROJECT_V12 - Win32
Debug--------------------

Compiling...

DriverCalls.cpp

c:\documents and settings\administrator\desktop\Project_Dir\wzuser. h(56) :
error C2146: syntax error : missing ';' before identifier 'Oid'

c:\documents and settings\administrator\desktop\Project_Dir\wzuser. h(56) :
error C2501: 'NDIS_OID' : missing storage-class or type specifiers

c:\documents and settings\administrator\desktop\Project_Dir\wzuser. h(56) :
error C2501: 'Oid' : missing storage-class or type specifiers

c:\documents and settings\administrator\desktop\Project_Dir\wzuser. h(69) :
error C2146: syntax error : missing ';' before identifier 'Oid'

c:\documents and settings\administrator\desktop\Project_Dir\wzuser. h(69) :
error C2501: 'NDIS_OID' : missing storage-class or type specifiers

c:\documents and settings\administrator\desktop\Project_Dir\wzuser. h(69) :
error C2501: 'Oid' : missing storage-class or type specifiers

c:\documents and
settings\administrator\desktop\Project_Dir\driverc alls.cpp(175) : error
C2039: 'Oid' : is not a member of '_PROJECT_QUERY_OID'

c:\documents and
settings\administrator\desktop\Project_Dir\wzuser. h(55) : see declaration of
'_PROJECT_QUERY_OID'

c:\documents and
settings\administrator\desktop\Project_Dir\driverc alls.cpp(175) : error
C2065: 'OID_802_3_CURRENT_ADDRESS' : undeclared identifier

c:\documents and
settings\administrator\desktop\Project_Dir\driverc alls.cpp(244) : error
C2440: '=' : cannot convert from 'unsigned char *' to 'char *'

Types pointed to are unrelated; conversion requires
reinterpret_cast, C-style cast or function-style cast

c:\documents and
settings\administrator\desktop\Project_Dir\driverc alls.cpp(310) : error
C2039: 'Oid' : is not a member of '_PROJECT_QUERY_OID'

c:\documents and
settings\administrator\desktop\Project_Dir\wzuser. h(55) : see declaration of
'_PROJECT_QUERY_OID'

c:\documents and
settings\administrator\desktop\Project_Dir\driverc alls.cpp(310) : error
C2065: 'OID_802_3_PERMANENT_ADDRESS' : undeclared identifier

c:\documents and
settings\administrator\desktop\Project_Dir\driverc alls.cpp(443) : error
C2039: 'Oid' : is not a member of '_PROJECT_QUERY_OID'

c:\documents and
settings\administrator\desktop\Project_Dir\wzuser. h(55) : see declaration of
'_PROJECT_QUERY_OID'

c:\documents and
settings\administrator\desktop\Project_Dir\driverc alls.cpp(443) : error
C2065: 'OID_GEN_HARDWARE_STATUS' : undeclared identifier

c:\documents and
settings\administrator\desktop\Project_Dir\driverc alls.cpp(503) : error
C2039: 'Oid' : is not a member of '_PROJECT_QUERY_OID'

c:\documents and
settings\administrator\desktop\Project_Dir\wzuser. h(55) : see declaration of
'_PROJECT_QUERY_OID'

c:\documents and
settings\administrator\desktop\Project_Dir\driverc alls.cpp(542) : error
C2039: 'Oid' : is not a member of '_PROJECT_QUERY_OID'

c:\documents and
settings\administrator\desktop\Project_Dir\wzuser. h(55) : see declaration of
'_PROJECT_QUERY_OID'

c:\documents and
settings\administrator\desktop\Project_Dir\driverc alls.cpp(542) : error
C2065: 'OID_GEN_MAXIMUM_LOOKAHEAD' : undeclared identifier


|
|
|
|
|
|



Error executing cl.exe.

Creating browse info file...



PROJECT_V12.exe - 44 error(s), 3 warning(s)

------------------------------------





"Puneet" <ptgoel at yahoo dot com> wrote in message
news:ezXYPzoKEHA.4052@TK2MSFTNGP11.phx.gbl...


Posted by Thomas F. Divine [DDK MVP] on April 25th, 2004


Make user that ntddndis.h is included after Windows.h.

Thomas F. Divine
http://www.rawetehr.net

"Puneet" <ptgoel at yahoo dot com> wrote in message
news:ezXYPzoKEHA.4052@TK2MSFTNGP11.phx.gbl...


Posted by Puneet on April 25th, 2004


Hello Thomas,

Thanks for the tip. those errors are gone now, but one more has cropped up.

--------------------Configuration: WIZE_V12 - Win32
Debug--------------------
Compiling...
StdAfx.cpp
c:\documents and
settings\administrator\desktop\integration_puneet\ stdafx.cpp(6) : error
C2146: syntax error : missing ';' before identifier 'ULONG'
c:\documents and
settings\administrator\desktop\integration_puneet\ stdafx.cpp(6) : fatal
error C1004: unexpected end of file found
Error executing cl.exe.
Creating browse info file...
BSCMAKE: error BK1506 : cannot open file '.\Debug\StdAfx.sbr': No such file
or directory
Error executing bscmake.exe.

WIZE_V12.exe - 3 error(s), 0 warning(s)
----------------------------------------------------------------------------
-----------

I am added typedef ULONG_PTR ULONG; in stdafx.cpp.

Even the other combinations i am trying like putting both

typedef ULONG_PTR ULONG;
#include <ntddndis.h>

in my driver calls file (after windows.h) is not working.
not getting what to do. any hints??

regards,
Puneet



"Thomas F. Divine [DDK MVP]" <tdivine@NOpcausaSPAM.com> wrote in message
news:u6TrKwpKEHA.3076@TK2MSFTNGP10.phx.gbl...


Posted by Puneet on April 26th, 2004


sorry! my mistake i was doing wrong.

This typedef ULONG_PTR ULONG should have been typedef ULONG ULONG_PTR



thanks for your time.
regards,
Puneet



"Puneet" <ptgoel at yahoo dot com> wrote in message
news:e60PYysKEHA.2576@TK2MSFTNGP12.phx.gbl...



Similar Posts