"... complaining about some missing references in libc. After spending two evenings ..." This is such a chronic problem with compiling any existing C or C++ code. I'm paranoid about touching any new 3rd party software in those languages because of the inevitable frustrating fragility of it all.
I do not understand your complaint. Any program, regardless of the language in which it had been written can be problematic to use when it depends on external libraries that you do not have. Python programs are many orders of magnitude more fragile than C/C++ programs, because I have seen plenty of such programs that require a certain Python 3.x version and they refuse to run with Python 3.(x-1) or 3.(x+1), making it…
Yes, you're correct that neither Python not C++ get this right, it's pretty sad that your conclusion is that therefore it's impossible.