Will binaries compiled on Jessie work on Stretch? What about the reverse?
The program in question is written in C++ (thus depends on the C++ standard library), but has no other external dependencies.
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It only takes a minute to sign up.Sign up to join this community
Will binaries compiled on Jessie work on Stretch?
They should, yes. Glibc has a pretty high degree of backward ABI (application binary interface) compatibility.
Other libraries may not have that, but if there is any trouble you can always install an older version alongside the new one -- possibly ripping it precompiled from a jessie package.
What about the reverse? The program in question is written in C++...
This may have more to do with how much new fangled C++ you use in relation to features implemented in the compiler. I think most if not all of C++ 11 was in the last jessie compiler, and implementation of C++ 14/17 continues. But you will be very aware of this if it applies.
However, beware that forward ABI compatibility is generally not a goal with any library, so this could be an issue anyway.