Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / March 2005

Tip: Looking for answers? Try searching our database.

"not the pdb file that was used when this precompiled header was created"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tommy Vercetti - 23 Mar 2005 00:12 GMT
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 precompiled header was
created, recreate the precompiled header.

Why would I get this error? How do I rebuild the precompiled header?
Clean Solution, Rebuild Solution, don't help.

If I manually delete the vc70.pdb, it doesn't seem to recompile. I've
also tried manually compiling stdafx.cpp. I get:

fatal error C1083: Cannot open precompiled header file:
'Debug/ProjectName.pch': No such file or directory

Any help is appreciated.

Managed C++ gets more and more frustrating every day.
Tomas Restrepo \(MVP\) - 23 Mar 2005 00:54 GMT
Hi Tommy,
> I am working on a Managed C++ project and I get the following error:
>
[quoted text clipped - 14 lines]
>
> Managed C++ gets more and more frustrating every day.

This should not be caused, I think, by your use of MC++. Seems like your
project settings got hosed somehow. First, try if you like to disable
precompiled headers (it's in the compiler options in the project settings).
See if that helps at first. If it does, then try setting your settings for
stdafx.cpp to "Create precompiled Header" (/Yc) with stdafx.h, and then set
the rest of the files to "Use Precompiled Header" (/Yu) with stdafx.h. See
if that helps

(man I hope I got this one right, it's been a while since I've fiddled with
those :))

Signature

Tomas Restrepo
tomasr@mvps.org
http://www.winterdom.com/

Tommy Vercetti - 23 Mar 2005 18:15 GMT
That resolved the issue; I removed all files and started adding them
back in slowly, and didn't properly reset stdafx.cpp to "Create
precompiled header".

You're right, this wasn't related to .NET or MC++. At least I'm one step
closer to getting this stuff working. Thank you!

Tomas Restrepo (MVP) wrote:

>>TestThread.cpp(3) : error C2859: c:\projects\ProjectName\debug\vc70.pdb
>>is not the pdb file that was used when this precompiled header was
>>created, recreate the precompiled header.

> This should not be caused, I think, by your use of MC++. Seems like your
> project settings got hosed somehow. First, try if you like to disable
[quoted text clipped - 3 lines]
> the rest of the files to "Use Precompiled Header" (/Yu) with stdafx.h. See
> if that helps

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.