Jump to content
  • Advertisement
Sign in to follow this  
dave

Difference Between Static And Dynamic L

This topic is 4905 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

I know that a DLL has its own heap space but that is about it. Why do commercial engines have DLLs and not LIBs? ace

Share this post


Link to post
Share on other sites
Advertisement
So that parts can be updated without recompiling the entire application. Additionally, some modules might need to be hardware-specific. They might write different renderers for nividia and ati cards, because they support different extensions or whatehaveyou. They can either write an app and 2 dlls, or distribute two seperate executables. Couple this with a generic sound module and one that takes advantage of the latest and greatest audigy, and now you have 4 different executables. And then if they find a bug in one module, they have to release new executables - or they could just release a new dll.

Share this post


Link to post
Share on other sites
Just a few thoughts :)

DLLs have a few advantages such as:

1. You can update/fix a DLL without recompiling the entire executable.

2. By dropping a new DLL / extending an existing one, you can easily add functionnality to a game. A plugin system for example or a patch that enables a new effect.

3. It can make the package smaller since the code is only present once. For example, say you have an engine that allows users to create plugins. They will have to be connected to the main engine. When using LIBs, they will be statically linked and the code will be duplicated in each and every plugin. Also, say one of the library is a memory manager, if you link with static LIBs, you'll end up duplicating that memory manager and it is probably something you don't want to do. Version management can be a bit easier with DLLs since it makes sure that all components are using the same version of the engine's code.


But, there are also a few downsides to dynamic libraries like making sure you have all the necessary DLLs, and that they are all up to date.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!