Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

XCaVeDoGX

MSVC++ and that stupid RC1004

This topic is 5172 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
You could try "Rebuild all" from the build menu (at least, that''s what it''s called in vc6)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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..

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!