Error RC1004: unexpected end of file found

How would you solve the situation when you have big project, which compilation lasts 10 minutes, but then you find error
"unexpected end of file found"
This refers to end of file resource.h but I have suspicion that there is some error in different file included before. Last thing I did (if I remember correctly) that I added header guards to some header files (cca 15) and created stdafx.h. But I checked all these guards if they have the #endif and all are ok. So I cannot find the source of the error. How do you solve this?
Last edited on
closed account (jyU4izwU)
I can't relay help you because i have no idea what your code is...
But I will try to do some research for you. Farewell for now.
You created stdafx.h, but did you include it? forgot inclusion of it in some file?
not including precompiled header can cause this
codewalker:
I have added it to the main application cpp. I did not see any error saying that i should include stdafx to all cpp. But maybe these errors disappeared because of /P option, which I added recently. Writing precompiled headers to file. So, I should probably include stdafx in all cpp files, still.
Last edited on
If use precompiled headers is on then you need to include stdafx.h in all .cpp files
Thanks, I will do that. Maybe I should remove /P options to see if some file is missing the #include stdafx.h
Oh, so I found the problem. So when I type in lowercase so it makes error.
So this is correct exactly:
#include "StdAfx.h"
error RC1004: unexpected end of file found

I got it found, it is a bug of resource compiler.

http://www.ucosoft.com/solution-of-fatal-error-rc1004-unexpected-end-of-file-found.html
Topic archived. No new replies allowed.