1
Graphics / Re: Using sf::Text and sf::Font in Windows ×64 MinGW
« on: June 01, 2023, 03:25:58 am »
Space can be a factor too.
When a static library is linked, the linker can see which parts are being used, so it only merges those into your final executable.
When a dynamic library is linked, the linker doesn't know who will load it at runtime, so it must include everything.
This means a static link results in a slightly bigger executable than dynamic, but no dlls with unneeded stuff, so overall static will be smaller.
On the other hand, if you have several executables in your project (maybe a game, an editor, a config program, etc) that all use the same library, static linking means every one of them has to include the parts they need, while dynamic linking lets them all share the same dll. So dynamic might have a saving there.
When a static library is linked, the linker can see which parts are being used, so it only merges those into your final executable.
When a dynamic library is linked, the linker doesn't know who will load it at runtime, so it must include everything.
This means a static link results in a slightly bigger executable than dynamic, but no dlls with unneeded stuff, so overall static will be smaller.
On the other hand, if you have several executables in your project (maybe a game, an editor, a config program, etc) that all use the same library, static linking means every one of them has to include the parts they need, while dynamic linking lets them all share the same dll. So dynamic might have a saving there.