hbcxx
Use "#!/usr/bin/env hbcxx" to make C++ source code executable
... library.
hbcxx is a tool to keep things fast and fun by putting of the moment you have to write a build system and an install script. For simple programs, especially for quick and dirty personal toys, the day you have to write a proper build system may never come.
Instead just copy your C++ source code into $HOME/bin. Try it. It works.