Debug版DLL LoadLibrary R6034异常的原因及解决
Posted 邵学军
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Debug版DLL LoadLibrary R6034异常的原因及解决相关的知识,希望对你有一定的参考价值。
Microsoft‘s recommendation is very confusing. That is, it recommends to include a manifest file and to re-compile the project.
I recently had a problem with ‘R6034‘ error message even with a manifest file already included!
In my case, Visual Studio 2005 compiles and builds a DEBUG-configuration of some DLL. But, as soon as I try to start an application that uses that DLL the loader can‘t load the DLL and displays an error message with error code ‘R6034‘.
It happened because two Run-Time DLLs were referenced in my DLL by some reason! As soon as I looked inside of my DLL I found two strings: ‘msvcr80d.dll‘ and ‘msvcr80.dll‘, and the 2nd one is the reason of that run-time problem.
In order to resolve the problem I added ‘msvcrt.lib‘ to the list of ignored libraries for DEBUG-configuration:
[Configuration Properties] -> [Linker] -> [Input] -> ‘Ignore Specific Library‘ -msvcrt.lib
以上是关于Debug版DLL LoadLibrary R6034异常的原因及解决的主要内容,如果未能解决你的问题,请参考以下文章
如何使用 LoadLibrary 函数导入 dll 文件并使用 dll 文件中的函数?