C++ dll 缺少对 Windows 7 文件的依赖

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17179380/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-27 20:58:54  来源:igfitidea点击:

dll missing dependencies on Windows 7 files

c++dllwindows-7interopdependencies

提问by Thalia

I have built a C++ dll to use from dot net. When I run the progran I get an error, dll not found.

我已经构建了一个 C++ dll 以从 dot net 使用。当我运行程序时,出现错误,找不到 dll。

The dll is there - but I checked it with dependency walker - and got for the following:

dll在那里 - 但我用依赖walker检查了它 - 并得到以下信息:

API-MS-WIN-CORE-COM-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
API-MS-WIN-SHCORE-SCALING-L1-1-0.DLL
DCOMP.DLL

Error opening file. The system cannot find the file specified.

I did a search - apparently these are Win 7 files an d I have Windows 7 - but didn't find them.

我进行了搜索 - 显然这些是 Win 7 文件并且我有 Windows 7 - 但没有找到它们。

What can I do ?

我能做什么 ?

I am using VS2010, Windows 7

我使用的是 VS2010、Windows 7

采纳答案by LawfulEvil

Dependency Walker (from here : http://www.dependencywalker.com/) has grown out of date. While it runs on win7/win8 it fails to detect normal DLLs from them. If you open up the 'about' tab of the latest version 2.2.6000, you'll see it was build on Oct 29th, 2006. yikes. Surprised it works at all.

Dependency Walker(来自这里:http: //www.dependencywalker.com/)已经过时了。当它在 win7/win8 上运行时,它无法从中检测到正常的 DLL。如果您打开最新版本 2.2.6000 的“关于”选项卡,您会看到它是在 2006 年 10 月 29 日构建的。哎呀。惊讶它的工作原理。

You can get the process monitor tool at several locations. I snagged mine from here : https://technet.microsoft.com/en-us/sysinternals/bb896645

您可以在多个位置获取过程监控工具。我从这里抢了我的:https: //technet.microsoft.com/en-us/sysinternals/bb896645

Once you've got it, you can add a filter for 'program name is ' whatever and then run your program. You'll see stuff that loads and fails to load and such. The result isn't quite as concise as you'd like, but when something fails, it'll be listed.

一旦你得到它,你可以为“程序名称是”添加一个过滤器,然后运行你的程序。您会看到加载和加载失败等内容。结果并不像您想要的那么简洁,但是当出现故障时,它会被列出。