![]() |
|
|||||||
|
|
Thread Tools | Search this Thread | Rate Thread |
|
#1
|
|||
|
|||
unexpected end of file while looking for precompiled header directiveI have a project to do for university, and for some reason I wrote the
essential classes of the application in one project, and then the gui classes in another project. I copied the files of the essential classes to a directory called "Model" in the directory of the gui project, When I added the files of the essential classes to the gui project and tried to compile them, I got this fatal error: "unexpected end of file while looking for precompiled header directive" Those files worked just fine when they were in their original project. What does this error mean, and what should I do to solve it? PS I'm using Microsoft Visual Studio 2002 |
|
#2
|
||||
|
||||
|
Quote:
It seems that you are using the precompiled headers option. Therefore, you have to include the stdafx header at the beginning of each .cpp file (before any other include). CPP / C++ / C Code:
P.S: stdafx == Microsoft crap! Best regards, Lucian __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
|
#3
|
|||
|
|||
|
Thanks a bunch it did the treak!
As for the stdafx, yeah I know it's crap, but unfortunately I had to write the gui of the project using mfc, which is a total disaster. If I had a say in this I would probably use some other library, come to think of it I would probably have written the project in Java. |
|
#4
|
|||
|
|||
|
Set precompiled headers option to "Automatically Generate (/YX)" and your error will disappear
Project properties -> c/c++ -> precompiled headers |
|
#5
|
|||
|
|||
Re: unexpected end of file while looking for precompiled header directiveGreetings,
I got to tell ya. I love working in C++ because it gives me the lower level control I need for the instrument control software that I write. But man, it is full of little hidden details. I've haven't done any code since 1999 until recently when I got Visual C++6 and started a new program. Wow... every day I was/am buried in roadblocks. This thread subject was one of them. (Which is now resolved - thanks to you'all) aie0 and LuciWiz, I do not know how you learned all this stuff.... but without the folks like you that I find thru Internet searches, sample code and MSDN forums, I would have been shut down on day 1. In other professions, "tricks of the trade" are closely guarded secrets, and novices can't get anyone to give them any advice. I sure appreciate both the professionalism and good hearted attitude of the people who particpate in these software sites. I wish I could give something back.... but I'm a mere babe in the woods...... let me know if you have a question about Criminal Law (my previous profession) or thermodynamics (my current gig)..... maybe I can help in fields I know something about. Thanks again, Mike |
Recent GIDBlog
Meeting the populace by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Airport Log program using 3D linked List : problem reading from file | batrsau | C Programming Language | 11 | 29-Feb-2008 07:44 |
| Apache2 config issues | monev | Apache Web Server Forum | 2 | 28-Jun-2004 06:19 |
| Yet another CD burner problem: Lite-On LSC-24082K | Erwin | Computer Hardware Forum | 1 | 22-May-2004 11:28 |
| Can't view pages from another machine on the Intranet | aevans | Apache Web Server Forum | 9 | 14-May-2004 02:26 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The