Re: [Dev-C++] compiler support for precompiled headers
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2002-09-25 16:05:41
|
Precompiled headers simply means that the compiler will only parse the *.h
files once, and then remember all declarations in them.
When the project contains multiple source files, the compiler then doesn't
have to scan these header files once for each source file. Also, if you
perform changes to a source file - excluding any changes to include files
or include file order - the compiler may resuse the precompiled header
information when it compiles the changed source file the next time.
VC, Borland, Watcom and some more compilers support it. Most other
compilers don't. But, preferably, your source files should not assume any
assumption about support for precompiled headers or not. Start all your
source files with the following snipped, and you should be find. If your
include files contains template code you might have to add a:
#ifdef __GNUC__
#pragma implementation "filename"
#endif
before you include the header file, to let gcc know that it should only
place the code expansion in one object file, instead of generating new
code whenever some source file is including the header file.
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
/Per W
On Wed, 25 Sep 2002, RICARDO HENRIQUE FOLADOR wrote:
[NON-Text Body part not included]
|