Sign in to follow this  

.lib and ,dll - what are they used for and how to make/use them?

This topic is 3314 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

A .lib is a static library that gets linked to your code.
A .dll is a dynamic library that gets loaded by your code at runtime.
Both provide a way for you to combine large portions of shared codebase into one file.


With a .lib, this means project A doesn't need to compile all the .cpp files that were put into the .lib, it just uses the .h files and links against the .lib. This is a good way to store shared code between projects (sound API, network API, graphics API, windows even has .libs you link against)

With a .dll, everything is linked at runtime, so you can update / change the dll to change functionality. This is good for things like plugins for photoshop or maya for example, where the system expects a dll with some set of functions in it, and if it gets that it can just link and call those functions.

Share this post


Link to post
Share on other sites

This topic is 3314 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this