Results 1 to 2 of 2

Thread: precomp.h

  1. #1
    Squire
    Join Date
    Jul 2010
    Posts
    26

    Default precomp.h

    Hi! I've noticed all the ClanLib examples include a 'precomp.h' file with the ClanLib includes inside. Is this just for convenience, or is there some technical reason for it?

  2. #2
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    It is for the Visual Studio precompiler.

    When the program is built:
    "precomp.cpp" is first built. It only includes precomp.h
    precomp.h contains the headers external to your application that does not change.
    A special "precompiled header information" file is created
    When "yourfile.cpp" is built, it uses the "precompiled header information file", so that is does not have to compile precomp.h.

    So that your application is faster to compile.

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •