Why in a project should I include some *.lib, .h or some other files? And what are these things used for?
LIB vs DLLLIB is a static library where functions and procedures can be placed and called as the application is being compiled. A DLL or Dynamic Link Library does the same function but is dynamic in a sense that the application can call these libraries during run-time and not during the compilation.
lib must be passed to the linker. The second one is explicit linking when we use the DLL by manually loading it with LoadLibrary function. In this type we don't need that . lib file, but we must put a little effort to find DLL exports, their addresses, and call these functions through pointers.
A DLL is just a file on Windows systems that has some code in that can be used by other executable files. An API is a way of using one piece of software, or a software library, to be used with another.
lib file contains all the code and data for the library. The linker then identifies the bits it needs and puts them in the final executable. For a dynamic library, the . lib file contains a list of the exported functions and data elements from the library, and information about which DLL they came from.
.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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With