Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Static vs Dynamic  (Read 14216 times)

0 Members and 1 Guest are viewing this topic.

scyth3s

  • Newbie
  • *
  • Posts: 20
    • View Profile
Static vs Dynamic
« 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.
"My church is not full of..."

noob4ever

  • Newbie
  • *
  • Posts: 9
    • View Profile
Static vs Dynamic
« Reply #1 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)

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Static vs Dynamic
« Reply #2 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.
SFML / OS X developer

 

anything