none
Visual studio 2005 C++ error C2065 RRS feed

  • Question

  • I need help understanding why I am getting error C2065 in the files listed below. The all include "stdafx.h" file.

    I tried moving the DEFINE_TAB_PAGE as part of the class declaration and that didn't help.

    Thanks,

    Priya

    #include "stdafx.h"
    REPMFuncChkDlg.cpp
    DEFINE_TAB_PAGE( CREPMFuncChkDlg, eFunctionCheckPage, _T("Function Check") )
    .\REPMFuncChkDlg.cpp(44) : error C2065: 'eFunctionCheckPage' : undeclared identifier
    MyDlg9.cpp
    DEFINE_TAB_PAGE( MyDlg9, eTestingPage, _T("Testing") )
    .\MyDlg9.cpp(41) : error C2065: 'eTestingPage' : undeclared identifier
    MyDlg7.cpp
    DEFINE_TAB_PAGE( MyDlg7, eTFA_DTFPage, _T("TFA/DTF") )
    .\MyDlg7.cpp(18) : error C2065: 'eTFA_DTFPage' : undeclared identifier
    MyDlg11.cpp
    DEFINE_TAB_PAGE( MyDlg11, eREPMOnlyAutoPage, _T("REPM Only Auto") )
    .\MyDlg11.cpp(31) : error C2065: 'eREPMOnlyAutoPage' : undeclared identifier

    Friday, June 14, 2019 6:25 PM

Answers

  • Where are your enums (eFunctionCheckPage, eTestingPage, eTFA_DTFPage,eREPMOnlyAutoPage ) defined?
    #include that file in this file and compile.

    -Seetharam

    • Marked as answer by pnadathur Monday, June 17, 2019 12:42 PM
    Friday, June 14, 2019 8:14 PM

All replies

  • Where are your enums (eFunctionCheckPage, eTestingPage, eTFA_DTFPage,eREPMOnlyAutoPage ) defined?
    #include that file in this file and compile.

    -Seetharam

    • Marked as answer by pnadathur Monday, June 17, 2019 12:42 PM
    Friday, June 14, 2019 8:14 PM
  • Compiler Error C2065


    Sam Hobbs
    SimpleSamples.Info

    Sunday, June 16, 2019 9:22 PM
  • Hi,

    Thank you for posting here.

    >>I need help understanding why I am getting error C2065 in the files listed below. The all include "stdafx.h" file.

    The compiler emits an 'undeclared identifier' error when you have attempted to use some identifier (what would be the name of a function, variable, class, etc.) and the compiler has not seen a declaration for it. That is, the compiler has no idea what you are referring to because it hasn't seen it before.

    If you get such an error in C or C++, it means that you haven't told the compiler about the thing you are trying to use. Declarations are often found in header files, so it likely means that you haven't included the appropriate header. Of course, it may be that you just haven't remembered to declare the entity at all.

    Best Regards,

    Jeanine Zhang

    Monday, June 17, 2019 2:17 AM
    Moderator