I have to develop C++ programs that have to run on Scientific Linux 5 or 6. I would like to develop with QtCreator on Ubuntu which has much more recent libraries than the one fo
You can establish the dependencies and the compiler for a given project using a build system like bazel (https://bazel.build/) or please (https://please.build/).
It will never be the same exact as a virtualenv, due to the different nature of the language, and since it will still be using the system compiler. In case you want to have your project completely isolated, you can ship the project on a docker container.