473,378 Members | 1,444 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,378 software developers and data experts.

Sharing precompiled headers between projects - Not Possible if /zi option?

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 situation, if anyone has a clue as to how I can solve this,
please let me know.
I am using VS.NET 2003 Arch. I have a solution two projects, a library
and an exe. The exe depends upon the library. Both build with /zi in
the release and debug configurations to allow me to debug at a customer
site and the like.

If I configure the library to build a precompiled header (/Yc) called
lib.pch and then configure the exe to use it (/Yu) I get the following:

ExeFile.cpp(9) : error C2859: C:\test\vc70.pdb is not the pdb file that
was used when this precompiled header was created, recreate the
precompiled header.

I know that I can name the pdb file in the properties such that I could
have exe.pdb and lib.pdb. So, I'd like to have a way of including the
lib.pdb in the build of the exe project.

To date I have tried the following:
1. create a 3rd project called PreCompiledHeader - not a fix
2. Switch all projects to not generate debug information - problem
fixed (but then I look symbol generation)

Is there a way for me to have my cake and eat it too? I have some 200+
projects and if I could switch to a common precompiled header for the
lot of them, it'd be a big win for me.

Thanks for the help.

Nov 17 '05 #1
0 1179

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

Similar topics

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...
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...
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...
by: Robert W. | last post by:
I'm building a solution that has 1 component for the Desktop and 1 component for the Pocket PC. (Though this isn't a mobile question). I have a data library that will be shared on both platforms....
by: Daniel | last post by:
Hi! I have several projects (approx 50) that includes basically the same files such as <atlcom.h> and <comdef.h>. The projects are set up to use a precompiled header wich includes these header...
by: Bonj | last post by:
Is it possible to avoid using precompiled headers on files that don't #include "stdafx.h". I have an ATL project,which has got a lot of ATL #includes in its stdafx.h. I now need to add some .c...
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...
by: Abubakar | last post by:
Hi, I am writing some unmanaged c++ code that would need to be compiled in the future using compilers other than vc++. I'm using the feature of vc++ "use precompiled headers", is there going to...
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...
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.