When you make a program or library for distribution that has
dependencies on dynamic libraries (shared libraries, on unix-like OSes;
DLLs on Windows) you accept as a matter of course that its operability on any
computer is constrained by the availability of identical or compatible versions of those runtime
dependencies, i.e. you can only distribute to an ecosystem of
compatible hosts. That is the basis of the linux, Windows, MacOS,
android, iOS ecosystems, which function well upon it.
Is you want to distribute software that has no dynamic library
dependencies to maximize its compatibility to the utmost (and beyond
what is normally sought) then you must build it
with static linkage, so that the
binary itself contains all of the code that it needs to execute. To do
this successfully you must have have installed on your system static versions of
all the libraries (such as libstdc++
) with which you would
by default link the dynamic versions provided with your toolchain.
Unless you have some specific fell-founded requirement to deliver a statically
linked product, don't worry about this.