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

后端 未结 8 1815
庸人自扰
庸人自扰 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:42

    managed to fix this by copying the below folder from another Visual Studio setup (non-express)

    from C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc

    to C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\atlmfc

    0 讨论(0)
  • 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 <windows.h>
    #endif
    
    /* IDC_STATIC is documented in winuser.h, but not defined. */
    #ifndef IDC_STATIC
    #define IDC_STATIC (-1)
    #endif
    
    #ifdef __cplusplus
    }
    #endif
    #endif   
    
    0 讨论(0)
提交回复
热议问题