Click here to Skip to main content
15,880,543 members
Articles / Programming Languages / C++
Tip/Trick

Complier Error: RC1004

Rate me:
Please Sign up or sign in to vote.
5.00/5 (4 votes)
15 May 2011CPOL 18.1K   3   1
Complier Error: RC1004
Full Error Name:
Resource Compiler Fatal Error RC1004
unexpected end of file found

To Fix:
Be sure to hit enter at the end of the last line in both the resource.h and the resource.rc files.

Example:

//resource.h
#define IDC_APPMENUS  100
#define IDM_EXIT      101
//a newline must be here

//resource.rc
#include resource.h

IDC_APPMENUS MENU
BEGIN
   POPUP "&File"
   BEGIN
      MENUITEM "E&xit", IDM_EXIT
   END
END
//a newline must also be here

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
Professional Experience
Languages: C++, C#, VB, .Net, SQL
Systems: MSSQL Database Architecture, Server Admin, MS System Center Admin(Service Manager)
Web: Asp.Net, Ajax, Web design and deployment
Other: MS Access guru

Comments and Discussions

 
Generalvery good trick Pin
Southmountain2-Mar-20 13:20
Southmountain2-Mar-20 13:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.