Jump to content
  • Advertisement
Sign in to follow this  
_MM_UnL1573d

dynamic link v. static

This topic is 4761 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 am learning to use the Allegro library, and I was just wondering, first, what's the difference between linking the library dynamically(sp?) and static(ally?)? Also, when packaging a project for freeware distribution or what have you, what would be the best option? thanks in advance, guys.

Share this post


Link to post
Share on other sites
Advertisement
Dynamic linking allows you to use one copy of the library for many separate applications, which was important back when disk space was scarce. It also allows you to upgrade (or break) the DLL separately from the application.

Static linking means there are no uncertainties about what version your application will be getting, and there won't be any mysterious breakages because one file mis-matches another file. However, the executable on disk will be bigger.

I would suggest to link statically.

Share this post


Link to post
Share on other sites
I was thinking along those lines, but I had to be sure :-).

And the .exe wouldn't be considerably larger, would it? I still haven't gone out of my way to learn about software distribution because I haven't made anything big yet, so sorry if these questions are stupid and/or redundant.

Share this post


Link to post
Share on other sites
imho, dll's are most useful in a plugin-based environment whereby new functionality can be added/updated without the need for recompilation. Also, depending on the project-client setup, DLL's may be the only way to go. for instance, my current project requries a plugin to work for a delphi application. the only way I can think of providing them the software is by distributing a DLL instead, which is theoretically language independent. Furthermore, we do not enforce the client to recompile their application every time we release a service update :P imagine if their product compilation takes a LONG time.. thats productivity savings ;)

it doesn't mean that they're the way to go. I'd stick to dynamic only if necessary.

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!