none
ndis.h header include error RRS feed

  • Question

  • I am getting the below error while compiling my driver code.

    error C2065: 'NDIS_MINIPORT_DRIVER_CHARACTERISTICS' : undeclared identifier

    I am using WDK8.0 and Visual Studio 2012, Win8Debug  x64 environment for compilation.

    This structure is part of ndis.h header file present under "C:\Program Files (x86)\Windows Kits\8.0\Include\km".

    c:\driver> MSBuild driver.vcxproj

    .......

    ClCompile:
      C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\AMD64\CL.exe /c /I
      Win8Debug\X64\ /I.\ /I..\osi /I..\..\include /I..\..\api /I"C:\Program Files
      (x86)\Windows Kits\8.0\Include\KM\..\api" /I"C:\Program Files (x86)\Windows K
      its\8.0\Include\KM" /Zi /nologo /W3 /WX /Od /Oi /Oy- /D _WIN64 /D _AMD6
      4_ /D AMD64 /D DEPRECATE_DDK_FUNCTIONS=1 /D MSC_NOOPT /D WIN32_LEAN_AND_MEAN=
      1 /D _WIN32_WINNT=0x0602 /D WINVER=0x0602 /D WINNT=1 /D NTDDI_VERSION=0x06020
      000 /D DBG=1 /D CAVIUM_PKEY_HOST_MEM /D CAVIUM_NO_MMAP /D CAVIUM_HUGE_MEMORY
      /D DMA_DYN_MAP /D BAR_NULL_VALID /D CAVIUM_RESOURCE_CHECK /D MC2 /D SSL /D ZI
      P100_WORKAROUND /D ZLIB_ZSTREAM_COMPATIBILITY /D RAW_RFC1950_DATA_FORMAT_SUPP
      ORT /D ZLIB_APP_64K_SUPPORT /D SG_GREATER_THAN_64K_SUPPORT /D CAVIUM_DEBUG /D
       CSP1_KERNEL /GF /Gm- /Zp8 /GS /Gy /fp:precise /Zc:wchar_t- /Zc:forScope- /GR
      - /Fo"Win8Debug\X64\\" /Fd"Win8Debug\X64\vc110.pdb" /Gz /wd4748 /wd4603 /wd46
      27 /wd4986 /wd4987 /wd4996 /FI"C:\Program Files (x86)\Windows Kits\8.0\Includ
      e\Shared\warning.h" /errorReport:queue  /kernel -cbstring /homeparams -d2epil
      ogunwind /d1import_no_registry /d2AllowCompatibleILVersions /d2Zi+  sysdep.c
      main.c pnp.c isr.c pthread.c registry.c mcode.c wmi.c power.c memory.c
      sysdep.c
      main.c

    The compilation shows its path is included. Still it shows the error.

    Any idea why the error is?

    Thanks

    Venkatesh


    Venkatesh

    Sunday, November 3, 2013 6:49 AM

Answers

  • It seems you should define "NDIS_SUPPORT_NDIS6"

    No please don't define NDIS_SUPPORT_XX -- these are defined automatically on your behalf when you define either NDISXX or NDISXX_MINIPORT.

    NDIS_SUPPORT_XX is read-only because more than one NDIS_SUPPORT_XX macro may be defined on your behalf.  For example, if you define NDIS620, then NDIS.H will define each of NDIS_SUPPORT_NDIS6, NDIS_SUPPORT_NDIS61, and NDIS_SUPPORT_NDIS620.  (Versioning is cumulative back down to the previous breaking change, which in this case was NDIS 6.0.)

    Read the comment at the top of NDIS.H to see which macros to define.

    Sunday, November 3, 2013 5:58 PM

All replies

  • It seems you should define "NDIS_SUPPORT_NDIS6"
    Sunday, November 3, 2013 12:38 PM
  • It seems you should define "NDIS_SUPPORT_NDIS6"

    No please don't define NDIS_SUPPORT_XX -- these are defined automatically on your behalf when you define either NDISXX or NDISXX_MINIPORT.

    NDIS_SUPPORT_XX is read-only because more than one NDIS_SUPPORT_XX macro may be defined on your behalf.  For example, if you define NDIS620, then NDIS.H will define each of NDIS_SUPPORT_NDIS6, NDIS_SUPPORT_NDIS61, and NDIS_SUPPORT_NDIS620.  (Versioning is cumulative back down to the previous breaking change, which in this case was NDIS 6.0.)

    Read the comment at the top of NDIS.H to see which macros to define.

    Sunday, November 3, 2013 5:58 PM