Re: VC++ Express edition question!
- From: Robby <Robby@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 14 Oct 2008 17:52:01 -0700
Hello Nathan,
Oh dear, I was told to do this earlier for the older VC++ compiler.
Basicaly, I have included the <stdio.h> file and did the precompiled header
modification and now it compiles. I thankyou for your help.
So I have never really questioned myself about precompiled headers when I
was doing some VC++ programming, I just included it because it was shown to
include it in the sample code.
So in a nutshell, what is so special about these precompiled headers? And
should I worry to know more about them?
Thanks!
--
Best regards
Roberto
"Nathan Mates" wrote:
In article <DACFCCE4-7D5C-43A1-9F58-5434C99A4EC8@xxxxxxxxxxxxx>,.
=?Utf-8?B?Um9iYnk=?= <Robby@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Now I am trying to do the same thing with VC++ 2008 Express edition. I don't
know why I have such difficulty with doing C in VC++, there is just too much
types of projects to choose from, and I get confused. Can someone please
guide me on this.
[...]
.\ccc.c(79) : fatal error C1010: unexpected end of file while looking for
precompiled header. Did you forget to add '#include "stdafx.h"' to your
source?
This is because Microsoft assumes that (1) everyone wants to use a
precompiled header -- which is really useful if and only if you know
what you're doing, and (2) people will recognize 'stdafx.h' as the
name of the file to use as a precompiled header. I've commented on
this before -- it's a decade overdue to get out of the MS-DOS 8.3
overabbreviated filename paradigm, and rename the *default* setting
here to something reasonable like '{$Project}PrecompiledHeader.h".
Two possible solutions:
1) When you create your project in DevStudio, after entering the
name, directory, etc, on the page that says "Click Finish to accept
the current settings," do **NOT** hit Finish. It's a trap. Instead,
go to the 'Application Settings' item, and unclick the [x] Precompiled
Header item. (Or, click on [x] Empty Project, which does the same, and
more.)
2) If you don't want to recreate your project, then right click on the
project in the Solution Explorer, and select Properties. Then, select
Configuration: All Configurations (at top-left), then go to
Configuration Properties -> C/C++ -> Precompiled Headers, and set
Create/Use Precompiled Header to "Not Using Precompiled Headers."
Nathan Mates
--
<*> Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein
- Follow-Ups:
- Re: VC++ Express edition question!
- From: Nathan Mates
- Re: VC++ Express edition question!
- References:
- VC++ Express edition question!
- From: Robby
- Re: VC++ Express edition question!
- From: Nathan Mates
- VC++ Express edition question!
- Prev by Date: Re: VC++ Express edition question!
- Next by Date: Re: VC++ Express edition question!
- Previous by thread: Re: VC++ Express edition question!
- Next by thread: Re: VC++ Express edition question!
- Index(es):
Relevant Pages
|