![](/img/trans.png)
[英]My Visual Studio 2012 program works in Debug, release without debug (ctrl + F5) but not release. How do I fix?
[英]Sample from Windows SDK works in Debug configuration, and fails in Release. How is that possible?
范例: http : //msdn.microsoft.com/en-us/library/windows/desktop/dd940359%28v=vs.85%29.aspx
当我在Debug配置中构建它时,一切都很好。
当我在发布配置中构建它时,我无法注册它。 当我打电话
regsvr32 ExplorerCommandVerb.dll
它说:
The module "ExplorerCommandVerb.dll" was loaded
but the entry-point DllRegisterServer was not found.
Make sure that "ExplorerCommandVerb.dll" is a valid
DLL or OCX file and then try it again.
我的配置:Windows 8.1 64位上的Microsoft Visual Studio 2013。 在Windows 7 32位上也是如此。
该项目的发行版中缺少此设置。 不知道它是否是由转换过程引起的,但是我可以重现所描述的问题。
在发行版本中未指定模块定义文件。 选择“ ExplorerCommandVerb 项目” (位于“解决方案”下方),然后选择“属性”。 选择链接器,然后在左侧的属性树中输入,然后在右侧选择模块定义文件。 在调试模式下,它显示为Dll.def,而在发布模式下,它丢失。 只需将设置复制到“释放”模式即可,它将按预期工作。
发现了问题:由于某种原因,它没有使用项目中包含的Dll.def文件。 我强迫它将此文件与链接器选项一起使用,现在它可以工作了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.