As a first experiment with Biicode, a C/C++ dependency manager, I decided to publish C++ Format there and this short post is about my initial experience with the service and how you can use the library with Biicode.
First of all, I really like the idea of a dependency manager for C++. This is something I’ve been looking for a long time after using such systems in other languages, namely PyPI/pip in Python and Maven in Java world.
My initial impression of Biicode was quite positive. It was easy to install on my Linux box, and creating and building the first project was a matter of a few simple commands. However, the documentation could be a bit better if it explained some of the basic concepts such as “blocks” before they are used.
I was happy to learn that Biicode is based on the CMake build system,
so potentially it could be easy to migrate my projects that already use CMake.
Unfortunately I didn’t find
anything in the documentation on how to import existing projects other than simply cloning
the repo into the
block/<user> directory, but the latter didn’t work with my projects.
So I created a stripped down version of C++ Format with only the files needed by the
client code and imported it as vitaut/cppformat.
Now I’m going to demonstrate how to use C++ Format with Biicode on a small example. First let’s create a Biicode project with a “Hello World” example:
blocks/myuser/myblock/main.cpp and replace the code with the following:
Now let’s resolve dependencies:
Isn’t it beautiful? Biicode resolved dependencies based on includes only, no configuration was needed.
And finally build the example:
As you can reusing the code with Biicode is dead simple. So I encourage you to try it out together with C++ Format!