Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4059370
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:12:01+00:00 2026-05-20T15:12:01+00:00

In the past I’ve used precompiled headers in VC to speed up compile times

  • 0

In the past I’ve used precompiled headers in VC to speed up compile times but usually only in smaller projects that are basically just a small directory of source code. Since VC++ requires that all files include the same header exactly regardless of path (say “foo.h” and not “../foo.h”) things get hairy when you have different nested directories of source. If all my files just

#include "foo.h" 

it works but only when I have precompiled headers on. To make this work in all cases I need to make dummy foo.h files that go

#include "../foo.h"

This starts to get ridiculous pretty fast especially when you have multiple levels.

Even though I typically prefer Microsoft tools I have to say that GCC’s system where you manually compile your headers into .gch files seems far superior to me. It is much less intrusive and doesn’t require you to include all your headers in every compilation unit which is ugly and slow if you are building on a compiler without precompiled headers.

Am I missing something about the VC version? None of the large projects I’ve worked on professionally have used precompiled headers and I want to make sure I give them a fair shake before I give up and just accept the longer compile times.

Is there a cleaner way of doing this?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T15:12:01+00:00Added an answer on May 20, 2026 at 3:12 pm

    Is it possible to update project include path, so there is no need to create separate header. We used header file Common/Common.h to create precompiled header in all projects.

    If the problem is compilation time, different approaches may address it: we removed precompiled headers from the project, as distributed compilation was significantly faster wihout them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the past, I used swiftsuspenders that is an actionscript 3 IoC controller. Basically
in past I have used fbml rendering but now there is to many update
in past i worked with my projects and everything was good. but recently, i
I read past questions but I couldn't solve my issue :( This is my
In the past I've heard that it can be dangerous to rename the Plone
In the past, when I've had to compile something on Snow Leopard (or any
In the past it was my understanding that the Lat/Lon of an airport had
In the past I have used MAPISendMail to launch Outlook (or whatever the desired
From past few days I'm trying to develop a regex that fetch all the
The past week or two I've been studying Maven, and I like it, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.