无法使用 regsvr32 注册 .dll - 仅在发布版本中
当尝试注册使用 regsvr32 创建的 .dll 时,我遇到了一个奇怪的问题。
在开发过程中一切都很顺利,调试版本注册并工作正常。现在我想创建一个发布版本,但该版本不再注册。
regsvr32 出现以下错误:
The module "mpegsplitter.dll" failed to load.
Make sure the binary is stored at the specified path or
debug it to check for problems with the binary or
dependent .DLL files.
The specified procedure could not be found.
一些研究将我带到了依赖项遍历器,它确实告诉我这一点
Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
它也确实显示了调试版本没有的对“crtdll.dll”的依赖项(函数视图显示了通常情况下的某些函数)应该在 ole32.dll 中),颜色为红色。
到目前为止一切顺利,我想它在某种程度上与依赖步行者在那里显示的内容有关。
但我该去哪里呢?我该如何修复它? 任何帮助将不胜感激,这已经让我忙了几个小时了。
谢谢!
I'm having a weird problem when trying to register the .dll i created using regsvr32.
During development everything went fine, the debug version registers and works fine. Now i wanted to create a Release version, but that Version does not register anymore.
regsvr32 comes up with the following error:
The module "mpegsplitter.dll" failed to load.
Make sure the binary is stored at the specified path or
debug it to check for problems with the binary or
dependent .DLL files.
The specified procedure could not be found.
Some research brought me to the dependency walker, which does tell me this
Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
It also does show a dependency on "crtdll.dll" that the debug version does not have (The function view shows soem functions that normally should be in ole32.dll), which is colored red'ish.
So far so good, i guess its somehow related to what the dependency walker shows there.
But where do i go from here? How do i fix it?
Any help would be greatly appreciated, that has been keeping me busy for several hours already.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我有同样的问题。当我比较Release模式的“命令行”(在项目属性->链接器中)和调试模式之间的差异时,我发现Release模式的“优化”选项(在项目属性->链接器中)是打开的,而ion 调试不行。
在发布模式下优化链接器解决了这个问题
I have the same problem. When I compared the different between "Command Line" (in Project Properties -> Linker) of Release and Debug mode, I found out that the "Optimization" options (in Project Properties -> Linker) of Release mode was turned on while ion Debug not.
Turning of Optimization for linker in Release mode solved the problem
是否有可能调试版本是使用
_ATL_MIN_CRT
编译的,但发布版本不是?您也可以使用Minimize CRT Use in ATL
项目属性来设置此选项。Is it possible that the debug version is compiled with
_ATL_MIN_CRT
but the release version isn't? You can set this with theMinimize CRT Use in ATL
project property as well.我修好了。这实际上是由我包含的一些 mingw 库的顺序引起的,这些库链接到 ffmpeg。哦,好吧,多么奇怪。
I fixed it. It was actually being caused by the order of some mingw libraries i included to link against ffmpeg. Oh well, how weird.
就我而言,差异在于 DEBUG 和 RELEASE 之间的模块定义文件条目。 DEBUG 版本指向 .DEF 文件,而 RELEASE 版本则为空。
In my case, the difference was in Module Definition File entry between DEBUG and RELEASE. The DEBUG version was pointing to the .DEF file where as the RELEASE had it empty.