gpt4 book ai didi

c++ - 包含 vld.h 后的 "The application was unable to start correctly"

转载 作者:IT老高 更新时间:2023-10-28 22:02:49 26 4
gpt4 key购买 nike

我在 Visual Studio 2010 的 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.)

我尝试了各种方法,包括按照此处的建议修改 list :

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

来自 Visual Leak Detector 的 Win32/Win64 bin 文件夹。发现于:https://vld.codeplex.com/wikipage?title=Building%20Visual%20Leak%20Detector%20from%20Source

关于c++ - 包含 vld.h 后的 "The application was unable to start correctly",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19216358/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com