Error c2065: "idd_dialog1": Undeclared identifier

Source: Internet
Author: User

Errors c2065: "idd_dialog1": Undeclared identifiers often occur during project compilation in VC. (⊙ O ⊙ )..., Clearly defined but not defined.

Sometimes there may be a lot

Error c2065: "idd_dialog1 ":

Error c2065: "idd_dialog2 ":

Error c2065: "idd_dialog3 ":

Error c2065: "idd_dialog4 ":

Error :.................................

Annoying. Clearly defined, all resources. H files can be found. What is the reason for this?

Some solutions on the Internet will not be mentioned here. In another case, the analysis is as follows:

Maybe you have defined a new class in the project: for example, cauthority is not derived from the MFC framework, it is a completely independent New Class (it has the header file: authority. H and implementation file: authority. CPP ).

Then the problem may occur. You may need to use the class associated with idd_dialog1 in this new class. Here it is called cmydilalog (it has the header file: mydialog. h and the implementation file: mydialog. cpp)

The header file of authority. cpp includes the following:

 
# Include "stdafx. H" # include "authority. H" # include "mydialog. H"

The error is as follows:

Error c2065: "idd_dialog1 ":

The error occurs because the header file of the project file is not included.

If the project name is: XXX

It should be changed to the following:

 
# Include "stdafx. H" # include "XXX. H" # include "authority. H" # include "mydialog. H"

Now the compilation is successful.

I don't know the specific reason. Which of the following experts can tell me ......

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.