Page 1 of 1

DLL or Static Library

PostPosted: Thu Jul 30, 2015 7:43 am
by andreialex
Hello,

As I am starting to create my basic engine I came across a little dilema.
I am thinking to make the whole engine in a DLL ( with the other modules as static library that will be added in the DLL ) and inport that in the game.
Is this a good practice or should I use other approach?

Andrei

Re: DLL or Static Library

PostPosted: Wed Dec 16, 2015 12:53 am
by L. Spiro
That was one popular approach with the advantage that when you want to update the game you can replace the .DLL and not the whole .EXE.

But in order to take advantage of that advantage you have to export quite a lot from the .DLL, which will be a pain in the ass during development. To reduce this pain you could export only a handful from the .DLL, but then you have a massive .DLL and a tiny .EXE, and then it no longer makes sense to “just replace the .DLL”.

I personally prefer to static-link. Development is easier and it is unlikely I will ever need to send out patches anyway. If I do, then I replace the whole .EXE. That’s not that horrible these days. Using the .DLL method was most common in the days when Internet sucked everywhere, and mostly doesn’t make sense these days.


L. Spiro