The problem I am having is that when I do a 'Rebuild All', StdAfx.cpp
is usually one of the last files to be compiled. This makes for very
slow compilation of the other files.
Is there any way that I can force VC 4.0 to compile StdAfx.cpp first
when I do a 'Rebuild All'
Jean Cyr
Look in Build->Settings under the tab C/C++ under category precompiled
headers.
> Jean Cyr
>
> jc...@magmacom.com
Andreas
--
Andreas Arff
mailto:a...@ergosoft.no or mailto:and...@online.no
I am just a boring sig
Make certain that you are using precompiled headers. It sounds as though
you are not!
--
Cecil Galbraith
CustomSoft mail to cgal...@concentric.net
Free programmer's utilities and MFC tips at
http://www.concentric.net/~cgalbrai
>I have a large MFC application I am compiling using VC 4.0. I have
>noticed that when I compile StdAfx.cpp first, the remainder of my
>C++ files compile much faster. I am assuming that this has something
>to do with precompiled headers.
>The problem I am having is that when I do a 'Rebuild All', StdAfx.cpp
>is usually one of the last files to be compiled. This makes for very
>slow compilation of the other files.
>Is there any way that I can force VC 4.0 to compile StdAfx.cpp first
>when I do a 'Rebuild All'
Set stdafx.cpp to generate the PCH file, and all the other files to
use (not create) the PCH file. You will find that stdafx.cpp will
always get compiled first.
Look in the Build/Settings dialog, on the C/C++ page, under category
"Precompiled Headers".
1. Invoke 'Build/Settings' from the menu.
2. Under 'Settings for:', select both the debug and release versions
of the project
3. Select the C/C++ tab.
4. Under 'Category', select 'Precompiled headers'.
5. Select the 'Use precompiled header file (.PCH)' radio button;
under the button, enter 'stdafx.h' in the 'Through header:'
edit box.
6. Now under 'Settings for:', double-click on the Debug release,
then select 'stdafx.cpp' from the list of files shown under
this release
7. Select the 'Create precompiled header file (.PCH)' radio button,
under the button, enter 'stdafx.h' in the 'Through header:'
edit box.
You also need to be sure that '#include <stdafx.h>' or
'#include "stdafx.h"' (depending on how you like to use header
file paths) is the _first_ include in each .cpp file, including
stdafx.cpp.
This will give you nice, fast compiles, much faster than checking
'Automatic use of precompiled headers'.Jean Cyr wrote: