Visual C ++创建DLL缺少依赖项

我只是使用Visual Studio 2015创建了一个C ++ DLL。我没有对默认源进行任何编辑。然后,我使用DependencyWalker查看了我所有的DLL依赖关系,然后看到了:

这

您可以清楚地看到所需的大多数dll都丢失了。

当我尝试连接到这样的dll时,我收到那些缺少的库的错误消息...

我尝试连接到CodeBlocks中制作的DLL,但它没有给我任何错误。

这是怎么回事 ?

PS:

这是错误消息:

该程序无法启动,因为您的计算机缺少MSVCP140_APP.dll。请尝试重新安装该程序以解决此问题。

我的问题的更多信息可以在这里看到

Ivan Aksamentov-掉落

您的问题由两部分组成。

第一部分

您可以清楚地看到所需的大多数dll都丢失了。

api-ms-win-* family of modules, introduced with Windows 7, consists of tiny stub DLLs that redirect function calls inside core libraries (such as kernel32, user32 etc.) to their implementations elsewhere.

They are not really missing, it's just Dependency Walker is ridiculously out of date (latest version dates back to year 2006) and doesn't know where to search. In fact, you can inspect any successfully running windows binary that links to system libraries and see the very same picture.

api-ms-win-* it's an internal details of Windows implementation and you shouldn't worry about it, unless you are working at Microsoft in Windows kernel team.

Part two

When I try to connect to such a dll I get error for those libaries missing... I tried connecting to a DLL made in CodeBlocks and it didn't give me any errors.

Visual C++ -> DLL (Universal Windows)
Visual C++ -> Win32 Project

You are mixing Win32 application (uses good 'ol Win32 API) and Universal Windows Platform libary (that what was Windows RT before).

Instead you should either:

  • (the Win32 way) create a usual Win32 DLL, by using Visual C++ -> Win32 Project template and then choosing Application type: DLL and then link it with your Win32 App.

  • (the WinRT way) create a Universal Windows App to link against Universal Windows DLL

Code blocks works here because it does not (and will probably never) support UWP.

P.S. You should never explicitly link against VCRUNTIME140_APP.dll or worse api-ms-win-*.dll unless you know what you are dong.

PPS说实话,您可以以有限的方式混合使用UWP和Win32但让我们将其称为高级主题,并留给好奇的读者作为练习。

链接:

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

Microsoft Visual C ++-编译一个没有依赖项的DLL

来自分类Dev

Microsoft Visual C ++运行时程序包框架缺少清单中的框架依赖项声明

来自分类Dev

在Visual Studio中替换依赖项DLL

来自分类Dev

在Visual Studio C#解决方案中将DLL引用替换为项目引用以获取项目依赖项

来自分类Dev

为 Visual Studio 代码安装离线 C# 依赖项

来自分类Dev

Visual Studio 2019 C ++ dll Excel VBA加载项问题

来自分类Dev

从Visual Basic调用C ++ DLL

来自分类Dev

在Visual C ++中创建“添加新项向导”

来自分类Dev

在Visual C ++中创建“添加新项向导”

来自分类Dev

Visual C++ 中缺少视图设计 (Visual Studio 2017)

来自分类Dev

Visual Studio社区2013年缺少C#添加新项

来自分类Dev

如何调试不是主 C# 应用程序(在 Visual Studio 中)的依赖项的类库?

来自分类Dev

Visual Studio 扩展依赖项

来自分类Dev

Visual C ++中的容错DLL使用

来自分类Dev

Visual Studio 2012 C#-导入DLL

来自分类Dev

缺少 kernel32.dll 的依赖项

来自分类Dev

如何将Visual Studio 2013 dll依赖项留在后面?

来自分类Dev

使用Visual Studio 2013部署时不会复制相关依赖项(DLL)

来自分类Dev

在Visual Studio 2013中向您自己的DLL项目添加依赖项/引用

来自分类Dev

在Visual C ++中创建DateTime对象

来自分类Dev

使用命令行从Visual Studio C ++ 2010创建DLL和LIB文件

来自分类Dev

从现有源创建 MS Visual C++ DLL 项目

来自分类Dev

在MS Visual Studio Community 2015中向C#Windows Forms应用程序添加依赖项

来自分类Dev

DLL导出和Visual C ++中DLL的接口

来自分类Dev

使用Visual Studio创建.dll

来自分类Dev

在不同的Visual Studio版本中缺少.dll

来自分类Dev

CMake Visual Studio项目依赖项

来自分类Dev

在Visual Studio中未安装依赖项

来自分类Dev

CMake-Visual Studio项目依赖项

Related 相关文章

  1. 1

    Microsoft Visual C ++-编译一个没有依赖项的DLL

  2. 2

    Microsoft Visual C ++运行时程序包框架缺少清单中的框架依赖项声明

  3. 3

    在Visual Studio中替换依赖项DLL

  4. 4

    在Visual Studio C#解决方案中将DLL引用替换为项目引用以获取项目依赖项

  5. 5

    为 Visual Studio 代码安装离线 C# 依赖项

  6. 6

    Visual Studio 2019 C ++ dll Excel VBA加载项问题

  7. 7

    从Visual Basic调用C ++ DLL

  8. 8

    在Visual C ++中创建“添加新项向导”

  9. 9

    在Visual C ++中创建“添加新项向导”

  10. 10

    Visual C++ 中缺少视图设计 (Visual Studio 2017)

  11. 11

    Visual Studio社区2013年缺少C#添加新项

  12. 12

    如何调试不是主 C# 应用程序(在 Visual Studio 中)的依赖项的类库?

  13. 13

    Visual Studio 扩展依赖项

  14. 14

    Visual C ++中的容错DLL使用

  15. 15

    Visual Studio 2012 C#-导入DLL

  16. 16

    缺少 kernel32.dll 的依赖项

  17. 17

    如何将Visual Studio 2013 dll依赖项留在后面?

  18. 18

    使用Visual Studio 2013部署时不会复制相关依赖项(DLL)

  19. 19

    在Visual Studio 2013中向您自己的DLL项目添加依赖项/引用

  20. 20

    在Visual C ++中创建DateTime对象

  21. 21

    使用命令行从Visual Studio C ++ 2010创建DLL和LIB文件

  22. 22

    从现有源创建 MS Visual C++ DLL 项目

  23. 23

    在MS Visual Studio Community 2015中向C#Windows Forms应用程序添加依赖项

  24. 24

    DLL导出和Visual C ++中DLL的接口

  25. 25

    使用Visual Studio创建.dll

  26. 26

    在不同的Visual Studio版本中缺少.dll

  27. 27

    CMake Visual Studio项目依赖项

  28. 28

    在Visual Studio中未安装依赖项

  29. 29

    CMake-Visual Studio项目依赖项

热门标签

归档