简体   繁体   English

在Visual Studio 2008中关闭运行时检查

[英]turning off run-time check in visual studio 2008

I have an application developed in linux(fedora6-13) it uses MITK, ITK, VTK, QT3. 我有一个使用linux(fedora6-13)开发的应用程序,它使用MITK,ITK,VTK,QT3。 I installed VS2008 and also MITK, ITK, VTK, QT3. 我安装了VS2008,还安装了MITK,ITK,VTK,QT3。 When i run the application it works fine however after every action i make (clicking on button, changig state of a slider) i get the following error: Run-Time Check Failure #2 - Stack around the variable 'variablename' was corrupted. 当我运行该应用程序时,它运行良好,但是在我执行所有操作(单击按钮,滑块的changig状态)之后,我收到以下错误:运行时检查失败#2-变量'variablename'周围的堆栈已损坏。 here i can hit continue and the app keeps on working just fine. 在这里,我可以点击“继续”,并且该应用程序可以正常运行。

Is there a way to disable this runtime-check? 有没有办法禁用此运行时检查?

Thank You 谢谢

Zoli 佐利

That runtime check tells you that you have a bug - don't turn off the check, fix the bug. 该运行时检查告诉您您有错误-不要关闭检查,请修复错误。

If you want to have random behavior, aka not fix the bug, then you can disable the check in project properties: C++/Code Generation/Basic Runtime Checks . 如果您希望具有随机行为(也就是不修复该错误),则可以禁用项目属性中的检查: C++/Code Generation/Basic Runtime Checks Be aware that this will lead to all sorts of weird problems - you won't be overwriting just the data VS uses to detect such overflows, you'll be overwriting data your app uses. 请注意,这将导致各种奇怪的问题-您将不会仅覆盖VS用于检测此类溢出的数据,而是会覆盖应用程序使用的数据。

I'd suggest you post the relevant code here on SO - you'll get help fixing the problem instead of hiding it. 我建议您在此处发布相关代码-您将获得解决问题的帮助,而不是将其隐藏。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM