Sign in to follow this  
extralongpants

unexpected end of file found (ugh...)

Recommended Posts

Ok, I'm tearing my $#%@ing hair out... After changing the code to my MFC based project, I compiled and ran it. My program began unexpectedly disapearing sometime during the ProcessShellCommand(cmdInfo) call, with nothing showing up during the debugger (no windows would show up, though the process was still running). I cleaned and completely rebuilt the project several times with no avail. So I closed msv c++ (with the program still running :/) and restarted my computer. I opened up c++, attempted to compile the code, and now I get this error message: "fatal error C1004: unexpected end of file found". I understand that this error message generally occurs when missing a '}', a semicolon after a class declaration, or when "stdafx.h" isn't included in the source file. Well, the problem is none of the above. I checked all my files, and the semicolons are all still there, I added a closing brace at the end to see if it would temporarily fix it (after also looking through files for a missing closing brace), and "stdafx.h" is still being included in all my source files, before anything else. I have no idea what could be causing this; the program was working fine just before I changed some things (none of which were MFC based, and no new files were created in the process), and I obviously didn't change any code since the last time I ran the app. I would greatly appreciate any help or advice. Thank you.

Share this post


Link to post
Share on other sites
Well, I found it. I looked through all my files, over and over again, and my eyes were starting to bleed, and then... there it was! Sure enough, a #endif was missing in a section of wizard generated code. I have no idea how i managed to delete it when i exited the program. Oh well, the error was found and corrected. Thank you very much, Hellsp4wn and Pipo DeClown for the help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this