Sign in to follow this  
Maverick Programmer

What are libraries and DLLs really good for?

Recommended Posts

What are libraries and DLLs really good for? And if they are helpfull, how do you make one? What are the differences? Also, if they merely define objects and functions, can't you just make libraries and DLLs- instead -a header file or cpp file?

Share this post


Link to post
Share on other sites
Antheus    2409
DLLs are dynamic binding. Headers are static binding.

If you use headers, you can supply multiple implementations, but you'll need to recompile entire application when one of those changes.

With DLLs, you can change the implementation each time application starts, or even while the application is running.

There tends to be overhead when calling functions in DLLs, the overhead is usually removed or lesser with static binding.

It's a design decision. If your application needs interchangeable modules and could benefit from separate compilation, either for deployment or development, then DLLs are one way of doing it.

Share this post


Link to post
Share on other sites

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