• Precompiled header?
    12 replies, posted
Does anyone ever use it? I personally have just been deleting it and forgetting it but recently I have been wanting to mess around with it. Is it good to use or no? I am a windows programmer so none of this portability crap please.
no
[quote=high6;16101528]i am a windows programmer so none of this portability crap please.[/quote] ಠ_ಠ
Precompiled headers? I didn't know you could compile a header.
[QUOTE=high6;16101528]Does anyone ever use it? I personally have just been deleting it and forgetting it but recently I have been wanting to mess around with it. Is it good to use or no? I am a windows programmer so none of this portability crap please.[/QUOTE] Precompiled headers are a compiler issue, not a platform issue. There are no portability issues to worry about at all. Basically you use a PCH when you have several large header files that change very infrequently. It speeds up compilation time. The PCH is included in every file of your project, AFAIK. So yes, people do use them. They're good if you use them for what they're intended for. Google ("g++ precompiled header use") will tell you how they work a lot more than I can.
[QUOTE=PvtCupcakes;16103775]Precompiled headers? I didn't know you could compile a header.[/QUOTE] gcc does it.
They are incredibly useful if you have a large header or a series of headers that you want to include in every file in a project.
[QUOTE=gparent;16105186]Precompiled headers are a compiler issue, not a platform issue. There are no portability issues to worry about at all. Basically you use a PCH when you have several large header files that change very infrequently. It speeds up compilation time. The PCH is included in every file of your project, AFAIK. So yes, people do use them. They're good if you use them for what they're intended for. Google ("g++ precompiled header use") will tell you how they work a lot more than I can.[/QUOTE] Not quite. [url]http://en.wikipedia.org/wiki/Precompiled_header[/url]
[QUOTE=Kylegar;16107973]They are incredibly useful if you have a large header or a series of headers that you want to include in every file in a project.[/QUOTE] Also provided they're relatively static. If they get updated a lot you pretty much loose all benefit.
[QUOTE=Xera;16109361]Not quite. [url]http://en.wikipedia.org/wiki/Precompiled_header[/url][/QUOTE] Which part is wrong? I can't notice.
The bit about being included into every file. That's a "Prefix Header". Although they are usually pre-compiled also.
[QUOTE=blankthemuffin;16112175]The bit about being included into every file. That's a "Prefix Header". Although they are usually pre-compiled also.[/QUOTE] Oh, sorry then. I think GCC is that way though (At least Code::Blocks has you do it)
[QUOTE=gparent;16113421]Oh, sorry then. I think GCC is that way though (At least Code::Blocks has you do it)[/QUOTE] I'm pretty sure you can turn it off as a Project Option or whatnot.
Sorry, you need to Log In to post a reply to this thread.