Release build not working when run without debugging in VS2010

自作多情 提交于 2019-12-02 18:22:51

问题


I encountered following problem:

I write program in c++ using VS2010. Debug build works properly when run with/without debugging in VS. When I launch built executable directly it also works.

Release build works when run with debugging in VS and alsp when I launch build executable directly.

Unfortunately, program does not work when I run release build in VS -without debugging-. Window is created and then program crashes quickly (without any error message). Since it crashes when run without debugging I don't know how to identify what causes the problem.

Any ideas what might be causing this? Thanks :)


回答1:


It seems most likely you have some sort of memory error/corruption that just happens to work ok in the debugger.

You can try using couts to isolate how far/where it dies, or try a tool like Purify (or valgrind for free if you can port to Linux).



来源:https://stackoverflow.com/questions/5837070/release-build-not-working-when-run-without-debugging-in-vs2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!