A C/C++ package manager

Nicely Packaged

© Lead Image © Hung Ling Tie, 123RF.com

© Lead Image © Hung Ling Tie, 123RF.com

Article from Issue 280/2024
Author(s): , Author(s):

If you use a state-of-the-art language such as C/C++, you need a package manager in your toolbox for managing libraries and their dependencies. Microsoft's vcpkg package manager offers an easy-to-use, platform-independent solution.

Today, hardly any developer writes the complete source code for an application. Preconfigured libraries for logging, database access, or a geometric modeling kernel speed up solution development. Using libraries lets compilers and linkers access a library's header files and DLLs, whether the libraries are used directly or referenced. Tools such as Maven for Java or NuGet for C# elegantly solve this task. At build time, they fetch the specified libraries from the Internet and resolve their transitive dependencies.

This type of package manager uses two different file types: the package description and the library file. In addition to the library's name and version, the package description contains a list of the other required libraries. Depending on the language used, the libraries themselves are available, say, as Java archives (JAR), C# DLLs, or JavaScript files. Both file types are typically provided on central servers such as Maven Central [1] or NuGet.org [2] and can be downloaded from there.

Your application includes a package description listing the required libraries. The package manager then downloads the requested package descriptions and library files from the central server before compiling. The package manager also takes care of resolving transitive dependencies before the build process starts using the library file, which is now available locally.

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Qmake for Qt

    Qt’s own build system Qmake is often overlooked for larger projects, but many experienced developers appreciate Qmake support for shadow builds and pre- or post-build dependencies.

  • TensorFlow AI on the Pi

    You don't need a powerful computer system to use AI. We show what it takes to benefit from AI on the Raspberry Pi and what tasks the small computer can handle.

  • QJournalctl

    QJournalctl is a convenient GUI tool that will help you track down log data in the systemd journal.

  • Self-Built PPAs

    Is the current package for your favorite Ubuntu program woefully behind the times? No problem: Just a few steps creates an updated Debian package that you can then share with others in a PPA.

  • Drawing Trees

    Mind maps help you organize your thoughts and ideas in a clear-cut tree structure. Heimer can help you draw those trees.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News