Is it possible to make object code (*.o) on newer gcc , and then link them (along with standard libraries like libc) on another machine. If the machines are identical it should likely work, but I am interested in a case where the 2 versions are different. This assumes that the basic architecture of machines (but not necessarily all things) like while both system are linux, they are of different flavors or different kernel versions (no mixing mac,linux and windows). As is well known standard repos of various linux distros have different standard libraries
A very simple example of mine worked, but I want to know if this possible in general, and what are the usual pitfalls?
It related to Dev production libc/libstdc++ mismatch [link libc.so.6/libstdc++.so.6 with older version] but felt this was specific enough to warrant a separate question