471,887 Members | 1,122 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,887 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 1114

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Asfand Yar Qazi | last post: by
4 posts views Thread by Andrew Ward | last post: by
16 posts views Thread by Robert W. | last post: by
20 posts views Thread by Bonj | last post: by
8 posts views Thread by Abubakar | last post: by
reply views Thread by YellowAndGreen | last post: by
reply views Thread by zermasroor | last post: by

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.