Thread: Resource Script Problem

  1. #1
    Registered User
    Join Date
    Apr 2007
    Posts
    7

    Resource Script Problem

    Hi, I have a resource script problem. Every time I compile my program, I get the following error message:

    C:\Documents and Settings\Edwin\My Documents\VS 6.0 Test\testexperiment5\Menus_ids.h(7) : fatal error RC1004: unexpected end of file found
    Error executing rc.exe.

    Here the two file connected to the resources:

    Menus_ids.h
    Code:
    #define IDM_EXIT 2000
    #define IDM_CHICKEN 2021
    #define IDM_FISH 2022
    #define IDM_GINGERALE 2041
    #define IDM_ROOTBEER 2042
    #define IDM_SHOW_TOTAL 2051
    #define IDM_CLEAR_TOTAL 2052
    Menus.rc
    Code:
    #include <afxres.h>
    #include "Menus_ids.h"
    
    Food MENU
    {
      POPUP "File"
      {
        MENUITEM "Exit", IDM_EXIT
      }
    
      POPUP "Entree"
      {
        MENUITEM "Chicken", IDM_CHICKEN
    	MENUITEM "Fish", IDM_FISH
      }
    
      POPUP "Beverage"
      {
        MENUITEM "Ginger Ale", IDM_GINGERALE
    	MENUITEM "Root Beer", IDM_ROOTBEER
      }
    
      POPUP "Order"
      {
        MENUITEM "Show Total", IDM_SHOW_TOTAL
    	MENUITEM "Clear Total", IDM_CLEAR_TOTAL
      }
    }
    Can onyone help me find what is wrong? Thank you for your help.

  2. #2
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    You might have a null char hiding in your header, and the ide is displaying it as a whitespace.

  3. #3
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    Does it change anything if you move your #include "Menus_ids.h" to the first line?
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Chemistry Problem In C++ Script Not WORKING
    By Thinker in forum C++ Programming
    Replies: 4
    Last Post: 03-09-2008, 09:02 AM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  3. resource file problem
    By cfrost in forum C++ Programming
    Replies: 1
    Last Post: 05-21-2004, 10:44 PM
  4. Resource size problem...
    By Devil Panther in forum Windows Programming
    Replies: 9
    Last Post: 04-29-2004, 01:58 PM