You’re the one running gcc (or g++
). It’s a compiler, used by developers. End-user systems may not have any version of gcc. It’s glibc
and libstdc++
you need to worry about. But in general, Linux does not aim for binary compatibility. Do not expect any binary executable to run properly on any other distribution/major version.
Conversely, glibc and libstdc++ are careful to work with old kernel versions, so you should be able to install (configure+make+install) the latest runtime support libraries on your Linux box, and then build your application for that.
The easiest way to do that is probably to install the same distribution and version that your target has, into a virtual machine. Then install the C++11 developer tools, and build your application.
2
solved What is the minimum reasonably supported GCC version? [closed]