#### Archived

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

# compile error question

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

## Recommended Posts

I''m making a level editor for my game using MFC. When i add my terrain class from my game project to the level editor one i get these compile error. Objects.cpp(56): fatal error C1010: unexpected end of file while looking for precompiled header directive Terrain.cpp(845): fatal error C1010: unexpected end of file while looking for precompiled header directive Can someone please tell me why and how to fix it?. There''s nothing wrong with the files they work fine in my game.

##### Share on other sites
I had that kind of problem a lot of times, all I did was look for the line where the error occured and removed illegal characters (sometimes the files on the hard-drive can get "corrupt" or somtimes things happen to it).

Or

Check where you have placed the '';'' sign. Make sure its all at the right places.

Hope this helps man!

It sounds weird but I actually had these problems.

// Last Attacker \\---=( LA )=---// LA Extreme \\

ICQ Number : 120585863

E-mail: laextr@icqmail.com

##### Share on other sites
yeah i had a problem like that when i programmed something at home then took it to uni.

The error is the very first thing and it still happens when the file is completly empty. Is it something to do with it being an MFC application or something?

##### Share on other sites
make sure you put
#include "stdafx.h"

as the first line (or before any other includes) in your Objects.cpp and Terrain.cpp files.

edit:
for any C++ source file that you add (.cpp), you need to have that line as the first line. it's the default pre-compiled header when building an MFC app.

[edited by - boni on April 16, 2004 2:54:10 AM]

##### Share on other sites
ahhhh thanks i though i tried something like that but i guess i did it wrong. Thanks again it was realy annoying me.

• 10
• 16
• 9
• 13
• 41