473,385 Members | 1,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Precompiled Header(s)


Section 6.5 of Josuttis, C++ Templates states - and I paraphrase.
"Let's assume for the sake of argument that every file to be compiled
starts with the same N lines of code. We could compile these N lines
and save the complete state of the compiler at that point in a so-
called precompiled header. Then, for every file in our program, we
could reload the saved state and start compilation at line N+1."

Josuttis, went on to state that "In practice this measn the files must
start with the same #include directives, which consume a substantial
portion of our build time".

So given a file called 'std.hpp'. For discussion purposes assume
std.hpp contains the following.

# include <iostream>
# include <string>
# include <vector>
# include <deque>
# include <list>

Later: foo.cpp
# include "std.hpp"

template < typename T >
void confused ( const std::vector < T >& bogus ) {
// stuff
} // end confused
At issue: How can I 'save the complete state of the compiler" such
that any / all changes made to confused wont result in re-compilation
of std.hpp?

Jan 5 '08 #1
0 1081

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Asfand Yar Qazi | last post by:
Hi, Now that GCC 3.4 has precompiled headers, I'm thinking I can stop using pimpls to speed up development time, as it may make life easier (declaring pimpls takes a long time...) What are...
1
by: JoeS | last post by:
Is there anyway to share a single pch file between projects in VC 7.0? I have 300+ projects each of which creates its own pch. All projects include the exact same header files in the precompiled...
4
by: Andrew Ward | last post by:
Hi All, I was wondering if it is possible to use precompiled headers without having to include a <stdafx.h> or whatever in every source file. My problem is that I have a project that makes heavy...
0
by: Bruno van Dooren | last post by:
Hi, I am working on a dll that exports COM interfaces, and i am having some troubles with the use of precompiled headers. the project compiles always, but if i use /Yu (default: use precompiled...
2
by: Tommy Vercetti | last post by:
I am working on a Managed C++ project and I get the following error: TestThread.cpp(3) : error C2859: c:\projects\ProjectName\debug\vc70.pdb is not the pdb file that was used when this...
0
by: citizenkahn | last post by:
I read an article entitled "Sharing precompiled headers between projects" on this group. I am in the same situation as the requesting author, but the solution has not worked for me. Here is my...
1
by: Alvo von Cossel I | last post by:
yo, i have a simple hello world win32 console application. it should work but there is an error. here is the most important part of the error: have you forgotten to add #include <stdfx.h> to...
3
by: Kevin Frey | last post by:
I am working on a test migration of our project to Visual Studio 2005 Beta 2 as a precursor to the availability of the full release of VS2005. The most onerous problem so far concerns the...
0
by: simon.hudon | last post by:
Hi everyone, I have a strange problem with precompiled headers with VC8. I have the problem while trying to use a precompiled header to build another precompiled header. I tried the sample...
11
by: gumboots | last post by:
Hi there guys, I've recently purchased "Sam's Teach Yourself C++ Fifth Edition" (About a week before the 6th edition came out) I'm trying to work through the book, but in trying to compile Hello...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.