Cannot open include file 'afxres.h' in VC2010 Express

后端 未结 8 1812
庸人自扰
庸人自扰 2021-01-30 02:01

I\'m trying to compile an old project using VS express 2010 but I get this error:

fatal error RC1015: cannot open include file \'afxres.h\'. from this cod

8条回答
  •  执笔经年
    2021-01-30 02:45

    Alternatively you can create your own afxres.h:

    #ifndef _AFXRES_H
    #define _AFXRES_H
    #if __GNUC__ >= 3
    #pragma GCC system_header
    #endif
    
    #ifdef __cplusplus
    extern "C" {
    #endif
    
    #ifndef _WINDOWS_H
    #include 
    #endif
    
    /* IDC_STATIC is documented in winuser.h, but not defined. */
    #ifndef IDC_STATIC
    #define IDC_STATIC (-1)
    #endif
    
    #ifdef __cplusplus
    }
    #endif
    #endif   
    

提交回复
热议问题