.dll,.lib,.h文件有什么区别? [英] What's the differences between .dll , .lib, .h files?

查看:92
本文介绍了.dll,.lib,.h文件有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么在项目中应该包含一些* .lib,.h或其他文件?这些东西是用来做什么的?

解决方案


  • 。 h :头文件,其包含声明的源文件(与包含实现的.cpp,.cxx等相反),


  • p> .lib :静态库可能包含代码或只是链接到动态库。无论哪种方式,它是编译的代码,你链接到你的程序。静态库在链接时包含在您的.exe中。


  • .dll :动态库。就像一个静态的,但你需要部署它的.exe文件,因为它是在运行时加载。



Why in a project should I include some *.lib, .h or some other files? And what are these things used for?

解决方案

  • .h: header file, its a source file containing declarations (as opposed to .cpp, .cxx, etc. containing implementations),

  • .lib: static library may contain code or just links to a dynamic library. Either way it's compiled code that you link with your program. The static library is included in your .exe at link time.

  • .dll: dynamic library. Just like a static one but you need to deploy it with your .exe file because it's loaded at run time.

这篇关于.dll,.lib,.h文件有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆