There are other decent uses for DLLs (plugins, Unix support like Cygwin), but saving memory seems terribly insignificant.
There are other decent uses for DLLs (plugins, Unix support like Cygwin), but saving memory seems terribly insignificant.
Also more and more C++ is written like this. Libraries are distributed as header-only and just compiled in.
With Windows, you tend to bundle your application with all of its dependencies in your installation folder...
With traditional Unix developpement you often rely on your dependencies being installed on the target system by the package manager, and building against shared librairies is the norm. You don't need the complexity of Windows DLLs either, the toolchain handle most of the complexity
Look at the failure of autopackage and the recent Snap and Flatpak efforts for proof of this.
Having a fully statically built binary is not difficult, but it isn't the default. People still often use dynamic loading for its benefits.
People wanting to distribute apps on the Windows way are going to run into problems, but the opposite is even more true...
Actually, it does not. If that's what you want then you are free to implement your windows-like installer. The process goes something like this:
* Install all binaries (executable and dynamic libraries) in a target directory (say, /opt/<your_app> or /usr/local/<your_app>)
* Create a shell script that sets the LD_LIBRARY_PATH to the directory where you've installed your program files and afterwards runs your application
* Run the application by launching the script
I would also like to add that the Windows-like process you've mentioned is also a crude hack developed to get around Windows' DLL problem.