Compiling a statically linked program
Now that we have such a deep understanding of libraries and linking, we can create a statically linked program—that is, a program with all dependencies compiled into it. This makes the program—more or less—dependency-free. Making statically linked programs isn't common but sometimes it can be desirable—for example, if you for some reason need to distribute a single precompiled binary to many computers without worrying about installing all the libraries. But please note: it's not always possible to create completely dependency-free programs. If a program uses a library that depends on another library, this is not easily accomplished.
The downside of making and using statically linked programs is that they get a lot bigger in size. Also, it's no longer possible to update the program's libraries without recompiling the entire program. So, bear in mind that this is only used in rare cases.
But,...