[英]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.我有一个相当大的项目,我正在 C++/Win32 中工作,现在我即将完成,我想开始在其他机器上测试它。 My project works great in Visual Studio - either in Debug or Release mode.
我的项目在 Visual Studio 中运行良好 - 无论是在调试模式下还是在发布模式下。 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.
我尝试使用visual studio提供的调试功能,打开malloc.c,说一个heap被破坏了。 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?
如果我在某处发生内存泄漏或其他问题,为什么从 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.
所以只需检查所有依赖库是否在其他系统中也可用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.