1

I am compiling a resource compiler file UIPE.rc and got the error:

error RC2104: undefined keyword or key name: ID_SOME_MENUITEM_NAME

UIPE.rc has a header file resource.h included. The file resource.h contains a bunch of MACRO definitions, e.g, #define IDD_ABOUTBOX 6202.

I googled the error message and realized ID_SOME_MENUITEM_NAME should be defined in resource.h. But the file resource.h seems an auto-generated file and I do not want to manually edit it.

Can anybody tell me how the file resource.h is generated how I can add the definition of ID_SOME_MENUITEM_NAME to the file?

leo
  • 357
  • 2
  • 15
  • as a common practice clean and rebuild a project, search for your "menu" component in .rc file, check if id's of your "some_menu_item" are exact you want, or you can just add your id to a header file stdafx if possible – Mandar May 09 '18 at 06:43
  • Is this in Visual Studio? It sounds like resource.h and UIPE.rc have got out of step somehow, although normally VS handles all this for you. If so, you will need to correct this manually. VS won't let you do anything with the resource file until you do so. – Paul Sanders May 09 '18 at 07:55
  • Did you found an answer on this question? Because I faced with it too. Furthermore, there is a clean comment in the `resource.h` which says that this file is generated by the VS automatically, but it seems nobody knows how. – Serge Roussak Oct 14 '21 at 13:00

0 Answers0