ChungZH is the author of this article

Blog address: chungzh.cn/

The package manager can help you more easily install dependencies and decide which versions to install, increasing your development happiness. Many languages have their own package managers, like NPM/YARN for Node.js, Cargo for Rust, PIP for Python, and so on. Of course, C/C++ also has its own package manager! Let’s take a look at the charm and features of these libraries

1. Conan

  • GitHub project address: github.com/conan-io/co…
  • Star number: 3 k
  • Documents: the docs. Conan. IO/en/latest /

First up is Conan (note, not Conan!). , a C/C++ package manager written in Python. It is completely decentralized and you can host the packages in the server yourself. It works on all platforms, including Linux, OS X, Windows, Solaris, FreeBSD, embedded and cross-compiled, Docker, WSL. It can be integrated with any build system and provides tested support for CMake, MSBuild, Makefiles, and more. In addition, it has acquired large corporate customers such as Mercedes Benz and Huawei. You can also find or share your C/C++ packages in Conan-Center.

Installing Conan is easy:

$ pip install conan
Copy the code

2. Buckaroo

  • GitHub project address: github.com/LoopPerfect…
  • Star number: 600
  • Documents: github.com/LoopPerfect…

The C++ package manager was developed using F#. It is unique in that it extracts dependencies directly from GitHub, BitBucket, GitLab, managed Git, and HTTP. Again, it is completely decentralized, with no central servers. Buckaroo uses the TOML configuration file.

For details, see Quick Install.

Its workflow looks something like this:

# Create your project file
$ buckaroo init

# Install dependencies
$ buckaroo add github.com/buckaroo-pm/boost-thread@branch=master

# Run your code
$ buck run :my-app
Copy the code

3. vcpkg

  • GitHub project address: github.com/microsoft/v…
  • Star count: 6 k
  • Documents: VCPKG. Readthedocs. IO /

VCPKG is developed by Microsoft father support Windows, Linux, Mac OS C++ library manager, to solve the problem of common dependency package management under Windows! It’s easy to integrate with Visual Studio, and you can use VCPKG Search to search for available packages. It can also get packages from Bitbucket, GitHub, GitLab, and more.

For details, see Quick Start.

4. clib

  • GitHub project address: github.com/clibs/clib
  • Star number: 3 k
  • Documents: github.com/clibs/clib/…

Clib is a C package manager (not C++) that is relatively simple to use. Also, it can install libraries directly from GitHub. Like Node.js, it is managed using package.json. Here’s an example:

{
  "name": "term"."version": "0.0.1"."repo": "clibs/term"."description": "Terminal ansi escape goodies"."keywords": ["terminal"."term"."tty"."ansi"."escape"."colors"."console"]."license": "MIT"."src": ["src/term.c"."src/term.h"]}Copy the code

5. poac

  • GitHub project address: github.com/poacpm/poac
  • Star number: 341
  • Documents: doc. Poac. PM/en /

Despite the current low number of STARS in POAC, it is actually suitable for beginners. It has an intuitive and easy-to-use interface (like NPM and Cargo). Uniquely, you can develop applications and libraries using poac without knowing anything about CMake, and focus on learning C++ without tripping. The authors also plan to integrate with other build systems and package managers so you can switch seamlessly.

Installation is also one line command done:

curl -fsSL https://sh.poac.pm | bash
Copy the code


Welcome to follow the HelloGitHub official account for more information and content of open source projects

Follow our articles to find interesting open source projects that will help you fall in love with open source and programming. Join us and contact us. Let us work together to make more people fall in love with open source, contribute to open source ~