#include <afxwin.h> führt zu fehler



  • #define STRICT
    //#include <afxwin.h>
    #include <windows.h>
    #include <basetsd.h>
    #include <commdlg.h>
    #include <mmreg.h>
    #include <dxerr8.h>
    #include <dsound.h>
    
    #include "resource.h"
    #include "DSUtil.h"
    #include "DXUtil.h"
    

    Weglassen der Auskommentierung führt zu:
    C:\Programme\VStudio\VC98\INCLUDE\mmsystem.h(694) : error C2011: 'waveformat_tag' : 'struct' type redefinition
    C:\Programme\VStudio\VC98\INCLUDE\mmsystem.h(706) : error C2011: 'pcmwaveformat_tag' : 'struct' type redefinition

    ??? Kennt jemand diesen Fehler?

    Viele Grüße



  • Hallo,

    dreh doch mal Deine Includes um in

    #define STRICT
    #include <windows.h>
    #include <afxwin.h>  // Hier kommts zum Fehler
    #include <basetsd.h>
    #include <commdlg.h>
    #include <mmreg.h>
    #include <dxerr8.h>
    #include <dsound.h>
    
    #include "resource.h"
    #include "DSUtil.h"
    #include "DXUtil.h"
    

    Es erscheint folgender Fehler ( aus afxv_w32.h ):

    #error WINDOWS.H already included.  MFC apps must not #include <windows.h>
    

    Danach sollte man sich richten. Der oben genannte Include <afxwin.h> includiert bereits <windows.h>.


Anmelden zum Antworten