Click to See Complete Forum and Search --> : Error while including files


hass0002
April 26th, 2004, 11:40 PM
Hi,
Whenever I try to include a file into my project, and select the file(s). I get this error:
fatal error C1010: unexpected end of file while looking for precompiled header directive

But if I add a class and just cut-n-paste the contents of the file(s) I don't get the error. Anyone know what I'm doing wrong?
It's a Managed C++ project.

TheCPUWizard
April 27th, 2004, 05:48 AM
You have the project set to use pre-compiled headers, and the file you are trying to add does not have a #include directive which matches the currently selected pre-compiled header name.

Either...

1) Turn off pre-compiled headers
2) Add the correct #include to your file.


hint: The pre-compiled header include default name is stdafx.h

hass0002
April 28th, 2004, 03:14 PM
CPUWizard - Thanks for the reply I just included that file and it worked.

Thanks