I'm trying to improve my knowledge and work on C++ more than before, but I couldn't find a community or a package-management system for C++, is there anything like pip for Python for C++ projects? Or I have to always search and test different library from github and other websites?
-
3Not in standard, but there are several ones (Conan, vcpkg, ...) – Jarod42 Feb 12 '21 at 12:47
-
There is no community or properly working package management. Each time you'll need to lurk around internets looking for libraries and for each library you will need to figure out some unique way to utilize it because there is no common build system either. – user7860670 Feb 12 '21 at 12:48
-
boost has a strong relation to standard c++ and is driven by the community. Though its not "pip-like" in any sense – 463035818_is_not_an_ai Feb 12 '21 at 12:50
-
[vcpkg](https://learn.microsoft.com/en-us/cpp/build/vcpkg?view=msvc-160) works fine on Windows. Haven't tried it elsewhere. As many other things in C++, the problem is not that we don't have a package manager, the problem is that we have 50. – Aykhan Hagverdili Feb 12 '21 at 13:02
2 Answers
a package-management system for C++, is there anything like pip
There are several.
But due to the fragmentation, you won't necessarily find all the libraries that you're looking for from any particular package manager.
Or I have to always search and test different library from github and other websites?
While this is an option, it's not the only one. Besides this, and the C++ package managers, another option is system package manager.
Does C++ have a community for libs?
Again, there are several. Perhaps no other community is as prominent as Boost.
Library collections tend to not be associated with a package manager.

- 232,697
- 12
- 197
- 326
-
Who needs a package manager when you can standardize every conceivable class? – Aykhan Hagverdili Feb 12 '21 at 13:08
This might be helpful: Does C++ have a package manager like npm, pip, gem, etc?
dds https://github.com/vector-of-bool/dds
conan https://conan.io/
spack https://spack.io
buckaroo http://buckaroo.pm
If you want to study further background about C++'s special background, there is a well-written paper about this matter.
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1254r0.html
It reads:
There is a clear desire for package management in the C++ community. And envy when a C++ developer works with, Rust, Python, Haskell, or any number of other languages.
...
However, it is still too difficult to integrate packages with dependencies of more than the standard library into a project. Some build systems and meta build systems provide some facilities for source integration into a project, which helps reuse, but requires build system standardization, which is not going to happen. For example, for GTest, the typical and recommended practice is to include the gtest's cmake build into the consuming project's build, while excluding it from all. This has the unfortunate side-effect of every projet having a slightly different version of GTest, and each project having to repeat the build.

- 29
- 1
- 5