一、断点调试
问题1、断点调试的时候老是出现One or more breakpoints cannot be set and have been disabled
问题2、Realse模式下调试
步骤如下:
1、在Project Settings里选Settings For为AllConfigurations。
2、在C/C++标签中,Debug info 选 ProgramDatabase。
3、在Link 标签中,Category选 Debug,选中Debug info复选框和Microsoft format。
现在就可以像在Debug版本中那样设置断点进行测试,但是记住,Release版本由于代码优化,有些变量是观察不到的,行的运行顺序可能也会不同。
二、编译
问题1、编译时报 pure specifier can only be specified for functions
问题2、编译时报fatal error C1083: Cannot open source file: '\VC98\MFC\SRC\APPMODUL.CPP '
例如:C:\Program
问题3、 托盘区弹出气球 出现错误 error C2065'NIIF_INFO' : undeclared identifier
问题分析:这个问题主要是由于SHELLAPI.H比较旧了,我们需要更改一下这个文件。
解决办法:找到VC++6.0的安装目录,如:"D:\Program Files\Microsoft Visual Studio\VC98\include\,到这个目录下后,你可以发现许多.h文件。找到SHELLAPI.H,然后用记事本打开,用查找命令,找到“//// Tray notification definitions”这一行,大概在记事本第490多行。然后再找到“//// End Tray Notification Icons”这一行,把这两行之间的内容全部注释掉或者删除,包括那两行,再重新粘贴上这些内容:(详见编译与连接的另一篇文章《SHELLAPI.H文件陈旧修改办法》)
问题4、'USES_CONVERSION' : undeclared identifier;'A2W' : undeclared identifier
三、链接
问题1、The source files "*\A.cpp " and "*\A.cpp " are both configured to produce the output file "*\A.obj ", The project cannot be built
问题分析:这个问题一般是因为工程中有两个同名文件,从而导致编译器不知道加载哪一个
解决办法:在编译器中删掉工程中的这两个文件,重新添加即可。