VC++ Express 2008 - missing ';' before identifier 'PhysicalMediumType'



  • Hey!

    1>cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release
    1>Main.cpp
    1>c:\programme\microsoft sdks\windows\v6.0a\include\netioapi.h(155) : error C2146: syntax error : missing ';' before identifier 'PhysicalMediumType'
    1>c:\programme\microsoft sdks\windows\v6.0a\include\netioapi.h(155) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\programme\microsoft sdks\windows\v6.0a\include\netioapi.h(155) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>SlowBob.cpp
    1>c:\programme\microsoft sdks\windows\v6.0a\include\netioapi.h(155) : error C2146: syntax error : missing ';' before identifier 'PhysicalMediumType'
    1>c:\programme\microsoft sdks\windows\v6.0a\include\netioapi.h(155) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\programme\microsoft sdks\windows\v6.0a\include\netioapi.h(155) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    

    Was könnte ich versuchen? Ich verwende die WinPCap library in meinem Projekt... Mit Express 2005 bestand das Problem nicht.

    MfG



  • ceplusplus@loggedoff schrieb:

    Hey!

    1>cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release
    1>Main.cpp
    1>c:\programme\microsoft sdks\windows\v6.0a\include\netioapi.h(155) : error C2146: syntax error : missing ';' before identifier 'PhysicalMediumType'
    1>c:\programme\microsoft sdks\windows\v6.0a\include\netioapi.h(155) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\programme\microsoft sdks\windows\v6.0a\include\netioapi.h(155) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>SlowBob.cpp
    1>c:\programme\microsoft sdks\windows\v6.0a\include\netioapi.h(155) : error C2146: syntax error : missing ';' before identifier 'PhysicalMediumType'
    1>c:\programme\microsoft sdks\windows\v6.0a\include\netioapi.h(155) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\programme\microsoft sdks\windows\v6.0a\include\netioapi.h(155) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    

    Was könnte ich versuchen? Ich verwende die WinPCap library in meinem Projekt... Mit Express 2005 bestand das Problem nicht.

    MfG

    wie wärs wenn du einfach den code in der header datei so änderst, wie der compiler es vorschlägt?

    -> ein ; vor 'PhysicalMediumType' hinzufügen und den typen (int) der funktionsdeklaration voranstellen. der compiler will mit dir reden - ignoriere ihn nicht 😉



  • Und wie?

    NDIS_MEDIUM MediaType; 
        NDIS_PHYSICAL_MEDIUM PhysicalMediumType; // Diese Zeile ist markiert
    

    (NDIS_PHYSICAL_MEDIUM nicht gefunden)

    So ein Schmarrn die 2008er Edition... Funzt wieder die hälfte ned 😡

    MfG


  • Mod

    Ich würde eher sagen Du hast ein SDK Problem. Was ist NDIS_PHYSICAL_MEDIUM denn bitte?
    Hast Du eine Doku dazu?



  • Aus der netioapi.h...
    Das PSDK ist doch in der Express 2008er schon integriert.

    MfG


  • Mod

    Und? Ist der entsprechende define für diese Struktur in dieser Header Datei drin?



  • Woher soll ich mich mit einem windows header auskennen?



  • NDIS_PHYSICAL_MEDIUM wird in <ntddndis.h> definiert.



  • Bei mir nicht.



  • Aus NtDDNdis.h vom 27.09.2007 / 14:19:

    //
    // Physical Medium Type definitions. Used with OID_GEN_PHYSICAL_MEDIUM.
    //
    typedef enum _NDIS_PHYSICAL_MEDIUM
    {
        NdisPhysicalMediumUnspecified,
        NdisPhysicalMediumWirelessLan,
        NdisPhysicalMediumCableModem,
        NdisPhysicalMediumPhoneLine,
        NdisPhysicalMediumPowerLine,
        NdisPhysicalMediumDSL,      // includes ADSL and UADSL (G.Lite)
        NdisPhysicalMediumFibreChannel,
        NdisPhysicalMedium1394,
        NdisPhysicalMediumWirelessWan,
        NdisPhysicalMediumNative802_11,
        NdisPhysicalMediumBluetooth,
        NdisPhysicalMediumInfiniband,
        NdisPhysicalMediumWiMax,
        NdisPhysicalMediumUWB,
        NdisPhysicalMedium802_3,
        NdisPhysicalMedium802_5,
        NdisPhysicalMediumIrda,
        NdisPhysicalMediumWiredWAN,
        NdisPhysicalMediumWiredCoWan,
        NdisPhysicalMediumOther,
        NdisPhysicalMediumMax       // Not a real physical type, defined as an upper-bound
    } NDIS_PHYSICAL_MEDIUM, *PNDIS_PHYSICAL_MEDIUM;
    


  • Ja, meine Datei hat selbes Erstellungsdatum. Dennoch ist diese enum nicht darin vorhanden. Woran liegt das?

    MfG



  • Oh, sorry, ist doch vorhanden. Hatte in der Suche ein Leerzeichen zuviel am Ende.

    Und warum erhalte ich dann die Fehler?



  • Weil wohl aus irgendeinem Grund <NtDDNdis.h> nicht mit includiert wird. Abhilfe würde wohl schaffen, wenn <NtDDNdis.h> vor <netioapi.h> zwingend eingebunden wird.


Anmelden zum Antworten