简体   繁体   中英

Why won't my C++/Win32 project work outside of Visual Studio?

I have a rather large project I'm working on in C++/Win32, and now that I'm nearing completion, I wanted to start testing it on other machines. My project works great in Visual Studio - either in Debug or Release mode. However, if I try to run either executable from its build directory (with all of the supporting files in place) they crash. I tried using the debug feature provided by visual studio, and it opened malloc.c, saying that a heap has been corrupted. If I had a memory leak or something somewhere, why wouldn't I be getting this error when I run my project from Visual Studio? I could use some pointers on how to debug what the problem might be.

I don't think that is due to memory leak. It has happened to me too when I tried to copy only the compiled executable but not depend libraries . So just check whether all depend libraries are available in other systems too.

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