Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/130.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/visual-studio-2010/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ &引用;应用程序无法正确启动";包括vld.h之后_C++_Visual Studio 2010_Memory Leaks_Visual Leak Detector - Fatal编程技术网

C++ &引用;应用程序无法正确启动";包括vld.h之后

C++ &引用;应用程序无法正确启动";包括vld.h之后,c++,visual-studio-2010,memory-leaks,visual-leak-detector,C++,Visual Studio 2010,Memory Leaks,Visual Leak Detector,我在VisualStudio2010的Win32项目中包括了vld.h、vld.lib和vld_x86.dll。它正确构建,但当我执行时,它会崩溃,并显示以下消息: "The application was unable to start correctly (0xc0150002). Click OK to close the application." 我使用Dependency Walker运行它,但它显示并排错误,如下所示: Error: The Side-by-Side confi

我在VisualStudio2010的Win32项目中包括了vld.h、vld.lib和vld_x86.dll。它正确构建,但当我执行时,它会崩溃,并显示以下消息:

"The application was unable  to start correctly (0xc0150002). Click OK to close the application."
我使用Dependency Walker运行它,但它显示并排错误,如下所示:

Error: The Side-by-Side configuration information for "D:\project\..\debug\VLD_X86.DLL" contains errors. The application has failed to start because its side-by-side configuration is incorrect.)
我尝试了各种方法,包括按照此处的建议修补清单:

https://vld.codeplex.com/discussions/360243
只有我在vld.h上注释了下面的行,它才能正常运行

// Force a symbolic reference to the global VisualLeakDetector class object from
// the DLL. This ensures that the DLL is loaded and linked with the program,
// even if no code otherwise imports any of the DLL's exports.
//#pragma comment(linker, "/include:__imp_?g_vld@@3VVisualLeakDetector@@A")
然而,如果我注释掉那一行,vld根本不输出任何东西(就像没有vld集成一样)


以前有人有这个问题吗?任何建议将不胜感激,提前感谢

我也遇到了这个问题,您需要将所有这些文件添加到与您的vld_x86.dll/vl_x64.dll相同的目录中:

Microsoft.DTfW.DHL.manifest

dbghelp.dll

它来自VisualLeakDetector的Win32/Win64 bin文件夹。从以下位置找到此问题:

我也有此问题(此错误消息)。在我的例子中,vld_x86.dll很可能是预期版本以外的版本,是由其他软件预安装和注册的。(似乎每个人都喜欢VLD)因此,它被加载,而不是VLD构建路径中的VLD_x86.dll。注销外部DLL解决了这个问题


因此,您可能需要检查从外来路径加载DLL的输出。

如果您使用的是Visual Studio

  • 如果您没有在include、linker部分弄乱项目属性,最简单的修复方法是确保您没有手动添加VLD。相反,请清除您在此处创建的包含并保存您的项目

  • 关闭它,然后安装最新的VLD,它将自动为VisualStudio项目创建包含父继承,包括环境路径


    • 其他人可能仍会卷入这一问题
      可能的修复方法是安装VLD 2.5.1版,可从github下载:


      它带来了上面解释的修复,包括dbghelp.dll

      我在安装vld后试图运行一个项目时遇到了这样的错误。我的解决方案是重新登录。因为vld安装程序向PATH添加了新路径,而VS在没有重新登录的情况下看不到它们。否则,您可以使用复制文件dbghelp.dll和.manifest的解决方案。

      这个答案节省了我的时间。在我将CEF1升级到CEF3,并将“Microsoft.DTfW.DHL.manifest”添加到另2个dll(vld版本v2.4rc2)的同一文件夹后,我的项目开始显示“0xc0150002”。我使用64位Windows 7,试图将我的项目编译为32位,但这种方法对我不起作用。(我刚刚将文件夹…\ConsoleApplication2\packages\VisualLeakDetector.2.5.0.0\lib\native\address-model-32\lib中的所有文件复制到…\ConsoleApplication2)在这种情况下,只需重新启动VisualStudio就足够了,无需重新登录。我刚刚尝试重新启动VisualStudio,但没有重新登录就无法工作。