简体   繁体   English

为什么我的 C++/Win32 项目不能在 Visual Studio 之外工作?

[英]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.

相关问题 为什么我的Win32(c ++,visual studio 2013)窗口没有显示? - Why isn't my Win32(c++, visual studio 2013) Window showing up? 如何在Win32 C ++项目Visual Studio 2010中使用ActiveX dll - How to use ActiveX dll in win32 C++ project visual studio 2010 链接时,Visual Studio Win32 C ++项目非常慢 - Visual Studio Win32 C++ Project very slow when Linking 如何在Visual Studio C ++ Win32项目中填充组合框 - How to fill combobox in a Visual Studio C++ Win32 project 使用Visual Studio将HTML浏览器嵌入到本机C ++ / Win32项目中 - Embed HTML browser into a native C++/Win32 project using Visual Studio 将C ++ Win32 Console项目类集成到Visual Studio 2008中的Visual C ++(Windows窗体应用程序)项目中 - Integrate C++ Win32 Console project classes into Visual C++ (Windows forms application) project in Visual Studio 2008 在两个Visual Studio 2010 C ++项目(DLL和Win32项目)中共享头文件 - Share header files within two Visual Studio 2010 C++ projects ( DLL and a Win32 project) Visual Studio 2017 C ++ Win32控制台项目模板 - Visual Studio 2017 c++ win32 console project template Visual Studio 2010 for C ++ Win32中的智能感知能力很差 - Poor intellisense in Visual Studio 2010 for C++ Win32 什么是Visual C ++中的Win32项目? - What is win32 project in visual c++?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM