I am having fun learning the C language, however, coming from Python, there is a feature that I really like. And that's virtualenvs which isolates packages you use in your program from your main system. This is really helpful for me. As an example, last day I needed a package that would help me play .wav files in my system, so I made a virtualenv and messed around with around 4-5 packages (some didn't work) and I found out that I can just use the built-in aplay program. So I didn't bothered using any packages anymore, but I didn't need to remove them from my main system, since they were contained only in the virtual environment. I was wondering if there is this same functionality in C programs. I have read about chroot but I don't know if that is the right answer.
TLDR: are there virtualenv for C programs?
TLDR: are there virtualenv for C programs?