Error RC1004: unexpected end of file found

Dec 1, 2013 at 12:53pm
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 Dec 1, 2013 at 1:57pm
Dec 1, 2013 at 1:01pm
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.
Dec 1, 2013 at 1:03pm
You created stdafx.h, but did you include it? forgot inclusion of it in some file?
not including precompiled header can cause this
Dec 1, 2013 at 1:12pm
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 Dec 1, 2013 at 1:17pm
Dec 1, 2013 at 1:19pm
If use precompiled headers is on then you need to include stdafx.h in all .cpp files
Dec 1, 2013 at 1:21pm
Thanks, I will do that. Maybe I should remove /P options to see if some file is missing the #include stdafx.h
Dec 1, 2013 at 1:48pm
Oh, so I found the problem. So when I type in lowercase so it makes error.
So this is correct exactly:
#include "StdAfx.h"
Dec 1, 2013 at 1:57pm
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.