简体   繁体   中英

Release build not working when run without debugging in VS2010

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:)

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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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