-1

I wanted to ask a probably very simple question should a game engine be a dynamic link library (.dll) or a static library(.lib)?

Currently, I am doing the dynamic link route, this is influenced by the fact that there are a libraries that the engine includes and if I want to use the engine in a different project I have to specify the library path too (for example my engine uses boost::filesystem to ease the use of file loading, but if I want to use it and have a static library, I need to then include my boost library location in the project that uses the engine and that seems icky to me)

So, should a game engine be a dynamic library, that can easily be included without the need for any additional prerequisites, or a static library that would require the prerequisites, but eliminate the need for a .dll file, or maybe there is a way to have a compromise between the two?

Gytautas
  • 13
  • 2

1 Answers1

1

If you have a collection of games that utilize the engine and are generally installed together and updated at the same time, then using a .dll may reduce the amount of data on disk (or downloaded during updates). It may also, depending on the OS and method of loading them, reduce memory usage.

If, on the other hand, this will be used in a variety of different games, possibly from different vendors, each assuming a different version, then making a static library may be a better choice. Keeping different app versions synched with a .dll can be tricky if there are potentially multiple versions of the .dll installed on the user's disk.

user1118321
  • 4,993
  • 1
  • 18
  • 25