Re:Even with the M2 Pro, Mac gaming is as bad as it’s ever been
by david2ndaccount on Thursday February 02, 2023 @04:40PM
(#34633536)
You can statically link SDL2 itself, but you are still dynamically linking to libsystem, Cocoa and a collection of other dynamic libraries provided by the system. Same thing on Windows, you are dynamically linking to user32.dll and other libs. And why wouldn’t you anyway? The system actually offers backwards compatibility for those dynamic libraries.
Given that you already have to have a dynamically linked executable, the difference between static linking your libraries vs. just shipping dlls alongside the executable is academic. It’s just another resource the program needs to run.
Common practice on linux does make this needlessly difficult - you have to fiddle with things like RPATH so that your libraries don’t try to load from system libraries with no backwards compatibility guarantee.
Given that you already have to have a dynamically linked executable, the difference between static linking your libraries vs. just shipping dlls alongside the executable is academic. It’s just another resource the program needs to run.
Common practice on linux does make this needlessly difficult - you have to fiddle with things like RPATH so that your libraries don’t try to load from system libraries with no backwards compatibility guarantee.