MSVC++ and that stupid RC1004

Started by
4 comments, last by XCaVeDoGX 20 years, 1 month ago
Ok, this is really starting to piss me off: my code has no syntax errors in it, the compiler shows 0 warnings and 0 (other) errors, and the exact unchanged code has compiled fine. But every so often, the compiler freaks out and spews RC1004 errors that demand I put a blank line at the end of every header file in the project. Creating a new project and adding the existing files doesn''t fix it, but creating a new project, creating new files, and copying the exact contents of the existing files into them does (which I am never taking the time to do again). Is there any reason for the compiler''s sudden disagreement with my code? The projects this happens to were created as a blank windows application without ATL/MFC support in MSVC++.NET if that helps.
Advertisement
Dont try and understand Visual Studio
IT''LL MESS WITH YOUR HEAD!!
Just comply.... if you find a workaround, write it down, rinse and repeat
You could try "Rebuild all" from the build menu (at least, that''s what it''s called in vc6)
open the *.rc files in your project with notepad and add a
carage return to them if they dont have them.

are you sure you are including "stdafx.h" in EVERY .cpp
header/source file?

this is a reasonably common error.
"I am a donut! Ask not how many tris/batch, but rather how many batches/frame!" -- Matthias Wloka & Richard Huddy, (GDC, DirectX 9 Performance)

http://www.silvermace.com/ -- My personal website
This fix is simple:
quote:MSDN:
Resource Compiler Fatal Error RC1004
This error can be caused by omitting the linefeed and carriage return characters on the last line of a text file.


~CGameProgrammer( );

Screenshots of your games or desktop captures -- Upload up to four 1600x1200 screenshots of your projects, registration optional. View all existing ones in the archives..
~CGameProgrammer( );Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
In the C++ (maybe C?) standard, it says that you should add a blank line at the end of every file. So what CGameProgrammer said isn''t just MS-specific.

This topic is closed to new replies.

Advertisement