From: Larry Lindstrom on
Hi Folks:

Developing on VS 2008 Pro, XP Pro, OpenGL, WIN32, no MFC.

I've decided to do my first Unicode app.

This is going to be big, so I'd like to try precompiled headers.

The MSDN documentation I've found describes manipulating the make
files for precompiled headers, but I'm used to having VS take care of
make files. I'm not sure what part of this I need.

Posts I've found in this group's archives describe a bit of this
and a bit of that.

Can you recommend a tutorial that will guide me through the process
of using precompiled headers with Visual Studio?

Thanks
Larry
From: ScottMcP [MVP] on
On May 12, 3:26 am, Larry Lindstrom <larryl_tu...(a)hotmail.com> wrote:
> Hi Folks:
>
>    Developing on VS 2008 Pro, XP Pro, OpenGL, WIN32, no MFC.
>
>    I've decided to do my first Unicode app.
>
>    This is going to be big, so I'd like to try precompiled headers.
>
>    The MSDN documentation I've found describes manipulating the make
> files for precompiled headers, but I'm used to having VS take care of
> make files.  I'm not sure what part of this I need.
>
>    Posts I've found in this group's archives describe a bit of this
> and a bit of that.
>
>    Can you recommend a tutorial that will guide me through the process
> of using precompiled headers with Visual Studio?
>
>                               Thanks
>                               Larry

Precompiled headers do not require you to use make files. Your
question seems to assume this. The VC 2008 IDE has a setting that
turns the feature on or off.


From: John H. on
Larry Lindstrom wrote:
> I'd like to try precompiled headers.

Often they are enabled by default, but you can toggle the settings on
a per project or per file basis in the IDE by using something like
Project Settings -> C/C++ -> Precompiled Headers.
The basic idea is that your project has one file called "stdafx.h".
In it, you #include commonly used headers like <vector> or common
defines, etc. In your cpp files, the first thing you do is #include
"stdafx.h". There is also a "stdafx.cpp" but usually that doesn't do
anything except include stdafx.h.