I suggest you ...

Allow precompiled headers to be shared between projects

In Visual Studio 2008 and earlier, I believe you could (by an unsupported method) allow one project to generate a precompiled header which other projects could then use. But I understand this is not possible, or only works in limited ways in VS 2010 and later.

Please add official support for allowing a precompiled header to be shared between projects.

As a nice to have it would also be ideal if more than one precompiled header could be used by a project so that both a shared and project specific precompiled header could be used.

See also:

http://social.msdn.microsoft.com/Forums/vstudio/en-US/665d4183-f85c-481d-bada-03283b310099/shared-precompiled-header?forum=vclanguage

http://stackoverflow.com/questions/14048212/can-i-share-a-precompiled-header-between-projects-to-reduce-compile-time

139 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    ScottLanghamScottLangham shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    3 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Robert McMillanRobert McMillan commented  ·   ·  Flag as inappropriate

        This would be hugely beneficial for decreasing build times. Sure you can have 10 projects and include the same headers in the precompiled header, but this needs to be compiled 10 times. We routinely have PCH files that take 15 seconds to build, so if you eliminate 9 of these compiles the time really adds up. We have several GBs of PCH files and cutting this down by 90% would probably make the entire build far more disk and memory efficient, which would be an additional win for build speeds.

      • PhilippePhilippe commented  ·   ·  Flag as inappropriate

        There is no need for that. Simply include a common file into every precompiled header file. You can then easily hva general things that is used by every project and specific things.

      Feedback and Knowledge Base