欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

VC++调试常见错误总结

程序员文章站 2022-04-25 19:22:44
1、errorc2859 90.idb is not the idb file that was used when this precompiled headerwas created。 解决方法...

1、errorc2859 90.idb is not the idb file that was used when this precompiled headerwas created。

解决方法:选中工程-->点击右键属性-->configurationproperties-->c/c++-->output files-->program database file name中的$(intdir)/vc90.pdb改为$(intdir)/(工程名).pdb即可。

2、failedto return new code element.

解决方法:关闭工程,删除工程中的.ncb文件,再重新打开工程即可。

3、makesure that the file is not open by another process and is not write-protected

解决方法:关闭工程,再重新打开即可。

网上有的说:tools-->options-->projectsand solutions-->builde and run-->将maximum number of parallelproject builds该为1即可,可是试试了并不起作用。

4、add/removeoperation is impossible,because the code element 'cxxx' is read only
解决方法:关闭工程,删除工程中的.ncb和.suo两个文件,再重新打开工程即可。

5、errorc2471 cannot update program database …..debug\vc90.pdb

解决方法:在属性配置里(1)、c\c++-->general-->debug information format:改为c7 compatible (/z7);(2)、c\c++-->code generation-->enable string pooling:改为yes (/gf);(3)、linker-->debuging-->generaldebug info:改为yes(/debug)即可。

6、errorspawning 'cmd.exe'

解决方法:tools-->options-->projectsand solutions-->vc++ directories:点击new line(类似文件夹图标)添加一行(cmd.exe所在目录):c:\windows\system32\,ok即可。

7、断点调试时,出现thereis no source code available for the current location

解决方法:tools-->options-->debugging-->general-->把requiresource files to exactly match the original version前面的勾去掉即可。