SFML community forums

General => General discussions => Topic started by: scyth3s on February 23, 2011, 05:44:06 am

Title: Static vs Dynamic
Post by: scyth3s on February 23, 2011, 05:44:06 am
What are some advantages of the different types of linking? I've done some searching, and know about the .exe only vs dll and such, but I'm curious what you peeps think.
Title: Static vs Dynamic
Post by: noob4ever on February 23, 2011, 01:58:02 pm
When you use static libraries, the libraries are compiled into the executable, increasing its size. When you change the libraries' code, you must recompile your program entirely. no dll's are needed in this case.

when you use dynamic libraries, the libraries are compiled into a .dll file.
when you update the libraries' code, you have to recompile only the libraries, and not your program entirely.

you should always use dynamic libraries, and provide the dll's files.

(appologies for my english, i'm French)
Title: Static vs Dynamic
Post by: Hiura on February 23, 2011, 04:56:09 pm
One more point pro shared lib (and therefore dynamic linking) is, well, your lib is shared among a potentially large number of applications ; which is a HUGE benefit as it doesn't duplicate the data on your disk and memory. Some OSes (eg. Unix-like OSes) can make some great optimization with shared libs.