问题描述
我建立与提升依赖的应用程序。我的应用程序的输出是最终被另一个客户端应用程序库。我最近发现我是用/ MDD为code代(调试CRT库)和客户端应用程序,甚至在调试模式下对发行CRT建筑建在调试模式下我的应用程序。因此,这可能会导致一些内存堆损坏的错误。为了证实这个测试我在释放模式一切,有这一切工作正常。
I am building an application with dependency on boost. My application output is libraries that end up being used by another client application. I recently discovered I was building my application in debug mode using /MDd for code generation (debug CRT libraries) and that the client application was built against release CRT even in debug mode. Hence this can cause some memory heap corruption errors. To confirm, this I tested everything in release mode and there it all works fine.
要解决这个问题,我建我的反对CRT发行库调试模式下的应用程序......但现在我的应用程序(独立测试)在运行时出现故障。我的理解是,这是由于升压依赖性和升压调试也许是对内置调试CRT库?我看着在提升文档,但无法找到正是我想要的......这是如何重建提升(在调试模式下)对发行CRT?鸭preciate任何帮助/创意/例子。感谢您的时间!
To address this issue, I built my application in debug mode against CRT release libraries... but now my application (in standalone tests) fails at run time. My understanding is this is due to the boost dependency and that boost debug is built perhaps against debug CRT libraries? I looked in the boost docs but couldn't find exactly what I wanted... which is how to rebuild boost (in debug mode) against release CRT? Appreciate any help/ideas/examples. Thanks for your time!
推荐答案
在除了@ AlKepp的回答,我想建议看看的的Dependency Walker 的(HTTP:// dependencywalker的.com /)。这是一个免费的工具,显示你的库库或应用程序依赖。通常你应该确保可以仅释放或Microsoft C / C ++运行时的DLL的Debug版本显示(如 MSVCP90.DLL
VS MSVCP90D .DLL
)。
In addition to @AlKepp's answer, I'd like to suggest to have a look at Dependency Walker (http://dependencywalker.com/). It's a free tool that shows you which libraries your library or application depends on. Usually you should make sure that either only the Release or the Debug version of the Microsoft C/C++ Runtime DLLs show up (eg MSVCP90.DLL
vs MSVCP90D.DLL
).
如果您的应用程序加载在运行时更加库(例如插件),请从应用程序的的Dependency Walker 的使用简介 - >开始分析
。然后,它会告诉你,其实是加载或试图执行过程中加载的所有库。
If your app loads more libraries at runtime (e.g. plugins), run the application from Dependency Walker using Profile->Start Profiling
. It will then show you all libraries that are actually loaded or tried to be loaded during execution.
这是一个很大的帮助,以解决任何依赖性问题,这对我帮助很大尤其是在这种情况下,不小心混放和调试的基础之上。
This is a great help to resolve any dependency issues, and it helped me a lot especially in this case of accidentally mixing release and debug builds.
这篇关于在调试建筑中的应用与CRT的释放与提升依赖性问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!