Error 1 Error C2859
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How do I eliminate error C2859 when trying to use a precompiled header with VS2010 (VC100) in debug mode? up vote 7 down vote favorite I am trying to upgrade an old solution to use VS2010 (VC100). I have it setup so that stdafx.cpp will create a precompiled header stdafx.pch from stdafx.h. Then all the other .cpp files that include stdafx.h are instructed to use the precompiled header. These posts helped me get this far: Visual C++ Precompiled Headers errors Precompiled Headers Now all is fine when I build in release mode. However when I try and build in debug mode I get a whole heap of errors saying: Error 1 error C2859: [removed]\debug\vc100.idb is not the idb file that was used when this precompiled header was created, recreate the precompiled header. I believe that this .idb file is an intermediate debug file created by Visual Studio. Why am I getting this error? In other words why did it not use this .idb file when it created the precompiled header? I'm not sure what further information you need to be able to give me answer so just ask if there is more information that I need to provide. visual-c++ visual-studio-2010 debugging precompiled-headers share|improve this question edited Jul 9 '10 at 17:19 Joel Coehoorn 248k92440661 asked Jul 1 '10 at 6:42 Steiny 552519 add a comment| 5 Answers 5 active oldest votes up vote 3 down vote accepted Thanks to a colleague I got
header with VS2010 (VC100) in debug mode? Visual Studio Languages , Windows Desktop Development > Visual C++ Question 0 Sign in to vote I am trying to upgrade an old solution to use VS2010 (VC100). I have it setup so that stdafx.cpp will create a precompiled header stdafx.pch from stdafx.h. Then all the other .cpp files that include stdafx.h are instructed to use the precompiled header. These posts helped me get this far: Visual C++ Precompiled Headers errors Precompiled Headers Now http://stackoverflow.com/questions/3155583/how-do-i-eliminate-error-c2859-when-trying-to-use-a-precompiled-header-with-vs20 all is fine when I build in release mode. However when I try and build in debug mode I get a whole heap of errors saying: Error 1 error C2859: [removed]\debug\vc100.idb is not the idb file that was used when this precompiled header was created, recreate the precompiled header. I believe that this .idb file is an intermediate debug file created https://social.msdn.microsoft.com/Forums/vstudio/en-US/7142bbfb-f633-4538-ae46-e35f1d449fd8/how-do-i-eliminate-error-c2859-when-trying-to-use-a-precompiled-header-with-vs2010-vc100-in-debug?forum=vcgeneral by Visual Studio. Why am I getting this error? In other words why did it not use this .idb file when it created the precompiled header? I'm not sure what further information you need to be able to give me answer so just ask if there is more information that I need to provide. Thursday, July 01, 2010 10:12 PM Reply | Quote Answers 1 Sign in to vote Ok I found the answer. The problem was that stdafx.cpp had Debug Information Format set to Program Database (/Zi) where as all the other files had it set to Program Database for Edit and Continue (/ZI). Changing them all toProgram Database for Edit and Continue (/ZI) and doing a full rebuild solved the problem. I guess the upgrade screwed it up somehow. Marked as answer by Jason Steenstra-Pickens Thursday, July 01, 2010 10:28 PM Thursday, July 01, 2010 10:27 PM Reply | Quote Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you whe
to all your basic programming questions. No Ogre questions, please! Post a reply 4 posts • Page 1 of 1 Reply with quote [solved] precompiled header http://www.ogre3d.org/forums/viewtopic.php?t=35835 issues by kneeride » Sun Sep 16, 2007 5:55 am I'm having http://jingyan.baidu.com/article/fcb5aff7a44532edab4a716b.html config issues with my precompiled header in vis studio 2005. My server app works fine. When the header files change, the precompiled header is automatically recompiled However, my ogre app does not recreate the precompiled header (I created the project with jacmoe's wizard): error C2859: xx\obj\debug\vc80.pdb is not the error 1 pdb file that was used when this precompiled header was created, recreate the precompiled header. I've checked the settings in both projects they they are seem to be the same. Both project has the following settings: Create/Use Precompiled Header: Use Precompiled Header (/Yu) Create/Use PCH Through File: StdAfx.h Precompiled Header File: $(IntDir)\$(TargetName).pch The only difference is that the ogre project has bolded error 1 error the first 2 values in the config (however the values are still the same). Any ideas why? My workaround with the ogre project is to set the first value to Create Precompiled Header (/Yc). Compile a couple of files, break the compile, then change back to Use Precompiled Header (/Yu). This is however a hassle. Any ideas how to mend my config? Thanks Last edited by kneeride on Mon Sep 17, 2007 4:56 am, edited 1 time in total. kneeride Bugbear Posts: 807 Kudos: 0 Joined: 14 May 2006Location: Melbourne, Australia Top Reply with quote by Devil N » Sun Sep 16, 2007 9:55 am In VC++, you can select a single source file to use for creating your precompiled header. Right click the .cpp file of your choice (I use my Main.cpp file), then choose Properties and you'll get that file's Property Pages. Set its properties to Create Precompiled Header, then leave the rest of your source files to Use Precompiled Header (which is done implicitly through your project settings). In my opinion, it would've made more sense if you could choose
C2859 错误解决方法听语音|浏览:187|更新:2015-10-12 08:57|标签:错误1234567分步阅读 百度经验:jingyan.baidu.comVS2005 的一个测试程序工程,测试结束后修改了一下导出文件的名字,重新完整编译时报了一个vc80.idb有关的C2859错误.完成错误信息如下:1>.\stdafx.cpp(5):errorC2859:d:\win_program\st5\dev_updata_v2\dev_updata_v2\sdk2(armv4i)\release\vc80.idbisnottheidbfilethatwasusedwhenthisprecompiledheaderwascreated,recreatetheprecompiledheader.步骤阅读百度经验:jingyan.baidu.com方法/步骤1首先想到的方法就是清理工程步骤阅读2重新编译工程。错误依然存在步骤阅读3清理整个解决方案步骤阅读4重新生成解决方案。依然没有解决。步骤阅读5仔细看错误说明,大概意思就是预编译头问题.尝试着改名等,都不能完全解决, 也就是让静态库pdb不是默认的vc80.pdb,而是跟随项目名称,瞬间,问题解决,不会反复出现重编译问题.步骤阅读6干脆在ConfigurationProperties|C/C++|OutputFiles里的ProgramDatabaseFileName改为$(IntDir)\$(ProjectName).pdb,步骤阅读7重新编译,成功了!!END经验内容仅供参考,如果您需解决具体问题(尤其法律、医学等领域),建议您详细咨询相关领域专业人士。举报作者声明:本篇经验系本人依照真实经历原创,未经许可,谢绝转载。投票(0)已投票(0)+1有得(0)我有疑问(0)◆◆说说为什么给这篇经验投票吧!写的太赞帮到了我作者很棒因为任性我为什么投票...你还可以输入500字◆◆非回享用户暂时不能发布经验“有得”如何加入回享?你还可以输入1000字◆◆如对这篇经验有疑问,可反馈给作者,经验作者会尽力为您解决!你还可以输入500字换一批相关经验vs2005,vs2010,vs2012中如何查找错误02014.02.02英雄联盟错误代码9解决办法22014.03.04宽带连接错误691的解决办法42012.08.2712306证书错误进不去解决办法02013.04.01宽带连接错误代码:711解决方法1842014.02.25相关标签错误今日支出元写经验 有钱赚 >>mgfsj个性签名: