问题描述
我必须开发必须在 Scientific Linux 5 或 6 上运行的 C++ 程序.我想在 Ubuntu 上使用 QtCreator 进行开发,它的库比 SCL6 上的库要多得多.
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 found on SCL6.
对于 C/C++ 程序,是否有等效于 Python 的 virtualenv?
Is there an equivalent of Python's virtualenv for C/C++ programs ?
使用带有所有必需库和依赖项的 chroot 可以完成这项工作.这存在吗?有关 chroot 的使用,请参阅 http://rcrowley.org/articles/dependencies.html.
Using a chroot with all the required libraries and dependencies could do the job. Does this exist ? See http://rcrowley.org/articles/dependencies.html on the use of chroot.
推荐答案
您可以使用以下工具:
- conan 虚拟环境(https://blog.conan.io/2016/08/04/Conan-virtual-environments-Manage-your-C-and-C++-tools.html)
- conda 虚拟环境(https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html)
- docker 容器
这篇关于对于 C/C++ 程序,是否有相当于 python 的 virtualenv?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!