public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Compiling on MacOSX is too long
@ 2004-09-02  8:32 Exxos Sir
  2004-09-02 11:48 ` Eljay Love-Jensen
  0 siblings, 1 reply; 2+ messages in thread
From: Exxos Sir @ 2004-09-02  8:32 UTC (permalink / raw)
  To: gcc-help

The builds are too long.

I need at least 1 minute to compile a .o file. I think
(but I'm not sure, that is due to includes given in
params of the gcc compiler, it is not the
compilation's problem).

(the same project in linux or windows takes 10
secondes max).

What are the reasons ?

Note: it is a macOSX G4


	

	
		
Vous manquez dÂ’espace pour stocker vos mails ? 
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Compiling on MacOSX is too long
  2004-09-02  8:32 Compiling on MacOSX is too long Exxos Sir
@ 2004-09-02 11:48 ` Eljay Love-Jensen
  0 siblings, 0 replies; 2+ messages in thread
From: Eljay Love-Jensen @ 2004-09-02 11:48 UTC (permalink / raw)
  To: Exxos Sir, gcc-help

Hi,

 >The builds are too long.

Some builds take a long time.

There are several techniques you can employ to reduce build times.

+) In your header files, try to use forward references where possible, 
instead of including the header files.

+) To improve on #1, make "header-header" files.  These files contain the 
forward references, and maybe a smattering of other public facilities (such 
as enums).  Use the header-headers in your header files.  The header that 
that the header-header represents should be the first thing included by the 
actual header file.

+) Put guards in all your header files.

+) Include all the headers (or header-headers) that your header or source 
file requires.  Do not include anything beyond that!

+) Do not make "kitchen sink header files", which include everything.

+) Used the "pointer-to-implementation" technique (the "pimpl pattern"), to 
reduce rebuild time.

+) Follow Lako's suggestions, Large-Scale C++ Software Design 
<http://www.amazon.com/exec/obidos/tg/detail/-/0201633620>.

+) Follow Peter Miller's suggestions, Recursive Make Considered Harmful 
<http://www.tip.net.au/~millerp/rmch/recu-make-cons-harm.html>.

HTH,
--Eljay

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-09-02 11:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-02  8:32 Compiling on MacOSX is too long Exxos Sir
2004-09-02 11:48 ` Eljay Love-Jensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).