C2065 error: undeclared identifier
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: C2065 error: undeclared identifier

  1. #1

    C2065 error: undeclared identifier

    Hi there:

    I create a simple dialog based app using MFC wizard, during the compilation, an "undeclared identifier" C2065 error is pointing to this line:
    enum { IDD = IDD_VIDEO_CONVERSION_MODULE_DIALOG };

    However, IDD_VIDEO_CONVERSION_MODULE_DIALOG should be automatically generated by the compiler, and it's indeed there in the resource.h.

    To bypass this problem, I had to redefined the ID like this in the source file:

    #ifndef IDD_VIDEO_CONVERSION_MODULE_DIALOG
    #define IDD_VIDEO_CONVERSION_MODULE_DIALOG 102
    #endif


    Is this a bug or I missed something?

    I am using Visual Studio 2008 VC.NET

    Thanks a lot!
    Sway

  2. #2
    Join Date
    Jun 2009
    Location
    oklahoma
    Posts
    199

    Re: C2065 error: undeclared identifier

    Make sure resource.h is included before your class definition.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center