C++/Visual Studio 2005 - 在编译调试配置期间跳过模板类
我有一个模板类,它一直能够在调试中编译,没有任何问题。但突然间,它拒绝检测类的更改并跳过它,除非我重建。其他非模板类没有问题,在Release中编译也不会出现这个问题,所以我暂时就用它。
奇怪的是,我新建了一个项目,还是出现同样的问题。
有什么想法吗?
非常感谢。 :)
I have a template class, which had always been able to be compiled in Debug, with no problems. All of a sudden though, it refuses to detect changes to the class and skips it, unless I Rebuild. There's no problem with other non-template classes, and this problem doesn't occur when compiling in Release, so I'm just using that for now.
The weird thing is, I've created a new project, and the same problem occurs.
Any ideas?
Thanks lots. :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是一个常见问题 - 至少对于 Visual Studio 来说是这样。有时它总是会重建。有时重建失败。您可以检查很多事情:
其中之一可能是“启用最小重建”,您可以在其中禁用它
项目->属性->C/C++->代码生成。
由于该问题仅发生在调试模式下,这可能就是问题所在。
如果 .obj 文件具有未来的日期,则可能会出现其他问题 - 但这应该在第一次重建后消失。
This is a common Problem - at least with visual studio. Sometimes it always rebuilds. Sometimes it fails to rebuild. There is a number of things you may check:
One might be "Enable minimal rebuild" which you can disable in
Project->Properties->C/C++->Code generation.
As th problem does only occur in debug mode this might be the problem.
Other problems may occur if a .obj file has a date in the future - but this should disappear after a first rebuild.
我尝试禁用最小重建,它似乎已经解决了问题。谢谢!
I've tried disabling minimal rebuild, and it seems to have fixed the problem. Thanks!