What's the differences between .dll , .lib, .h files?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 15:20:40

问题


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


回答1:


  • .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.




回答2:


  • H Declares the interface to a library - including functions, structures, and constants. Written in the C language.
  • LIB Either declares the binary interface to a dynamic library (DLL) or contains the binary code of a library.
  • DLL A dynamic library - your application shares these with the system or you use them to keep your code base organized.
  • DEF A textual description of functions exported by a DLL.



回答3:


*.dlb is similar to static library.



来源:https://stackoverflow.com/questions/1778111/whats-the-differences-between-dll-lib-h-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!