Thread: How can g++ recognize *.hpp header files?

  1. #16
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by Elysia View Post
    Using PCH for Windows.h saves lots of time when you have a lot of source files that needs Windows.h. That's the beauty of the them.
    Sure.

    But for example the "Boost" functions would be very unlikely to (commonly) use Windows.h.

    It is more likely that Boost consists (as CornedBee suggests) of lots of template "meta-programming" along with a large number of small C++ source files that are compiled.

    For the best benefit of precompiled headers, all source files should include one "most headerfiles included in one header" file, e.g. all.h - that way, there's one all.h.pch that is being re-used many times. This is of course the opposite of isolating and reducing the set of includes to a minimum.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  2. #17
    Registered User
    Join Date
    Nov 2007
    Posts
    33
    Actually, I'm using boost::gil
    http://stlab.adobe.com/gil/

    The library wrap all the implementation into header files, thereby it even don't need a .so library file.

    I have about ten source and header files include them.
    So, it should be a good candidate for precompiled technique?

    BTW, I can't find active forum for boost::gil, anybody using it here?
    It's a nice library, however, not enough documentation or community support...

  3. #18
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Precompiled headers never hurts (no performance impact or so), so you can go ahead and use it if you want.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #19
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    You can ask questions about GIL on the boost-user mailing list.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  5. #20
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by jutirain View Post
    BTW, I can't find active forum for boost::gil, anybody using it here?
    You shouldn't find much discussion around GIL outside that of implementation details. Not until it becomes a part of boost.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Checking array for string
    By Ayreon in forum C Programming
    Replies: 87
    Last Post: 03-09-2009, 03:25 PM
  2. Confusion on header and source files
    By dnguyen1022 in forum C++ Programming
    Replies: 4
    Last Post: 01-17-2009, 03:42 AM
  3. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  4. more header files
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 10-28-2001, 01:56 PM