Livestreams

Webinar Recording: Developing C/C++ projects with CLion IDE and Conan C/C++ package manager

The recording of our July 11th webinar with Diego Rodriguez-Losada and Luis Martinez de Bartolome, Developing C/C++ projects with CLion IDE and Conan C/C++ package manager, is now available on JetBrainsTV YouTube channel.

In this webinar we’ve discussed the process of developing large C/C++ projects using the package modularization and reuse offered by Conan package manager, and the power and convenience of the CLion IDE, using the CMake build system.

Useful links:

Agenda:

  • 00:37 – Consuming existing packages of OSS libraries Boost, Poco, etc
  • 10:10 – How to create packages from your own source code
  • 15:30 – Conan profile
  • 19:30 – Totally skipping the local cache to depend on a locally edited package
  • 43:00 – Questions

https://www.youtube.com/watch?v=qpOul18bXes

Below are some questions from our webinar answered by Diego, Luis and Anastasia.

Q: Are there any plans about Conan integration into CLion? Some UI, ability to have Conan settings in CLion, etc.
A: We’ve discussed this opportunity with the Conan team, as well as inside the CLion team. It looks interesting to us and we feel there is room for a plugin here. Together with Diego and Luis we’ve came up with some understanding of the integration scope and priorities. However, due to the lack of the resources in both teams, we are not on it right now. Still I believe, in future we could come up with a Conan plugin for CLion (which may even go to OS to get more contributors from the community).

Q: Does Conan support cross-compilation?
L: Yes, check the docs here, we have some examples with ARM and Android.
D: It does, and we are aware of several users who are heavily cross-compiling. There are several features for this, like build requirements that allow to inject dev tools and toolchains, like CMake Helper that I was demonstrated earlier, and others. In documentation you can find samples with cross-compiling to Raspberry Pi, Android, cross-compiling from Windows to Linux, etc.

Q: Which languages (others than C++) does Conan support? Can I use Conan for Go or Rust?
D: Yes. As you can see the recipe is quite general. When we realized that Conan recipes are very flexible, we built some proof-of-concepts. For example, for Go language. That means you can use Conan to manage dependancies for Go.
There is also a nice features that you can create Python packages with Conan – one of the feature our users were requesting. Thus you can reuse the Python code into your recipes.
I guess all the samples are in our documentation.

Q: How can I start my own Conan server?
D: Well, there are a few options. The first one is an open sourced Conan server (MTI license), It’s included into Conan distribution, so you get it when Conan is installed on your machine. You can easily launch it.
In case you need something more powerful, that is able to scale to big things, Conan now has an integration with Artifactory. Thus you can create your own Artifactory instance with Conan repositories and use it.
The third option is a bintray. If you are distributing OS, you can create packages for OS libraries and distribute them via bintray.

Q: Your samples are all on Windows. Are there any general differences when using on Linux?
L: It’s the same process for Linux, Conan is multi-platform and we have binary already available at bintray.com conan-center repository for several compilers.

Q: How shared object libs are located at runtime? Does Conan assume it will find them in the local cache, or can it get them from a shared network location?
L: You can locate them in the local cache and we have an “Imports” methods that you can use to copy the shared libraries to a local directory. There are several different approaches, for windows dlls the common one is to import the dll to the project bin dir

Q: How compiler profile can be added? Is it just a plain text file stored in .conan directory?
L: Yes, .conan/profiles, but you can also specify a custom path with –profile=path/to/profile. Plain text, very simple. Take a look here.

Q: Who will support boost library in the repository? It is not using CMake for the build.
L: It doesn’t matter, Conan is not coupled with any build system. The Conan recipe can explicitly call the boost build system, the only important thing is the libraries and the headers you get and know the names and the location of them. So consumers can use them from CMake or any other build system.

Thanks to all the attendees for the questions!

About the presenters:

Diego Rodriguez-LosadaDiego Rodriguez-Losada

Diego’s passions are robotics and SW engineering and development. He has developed many years in C and C++ in the Industrial, Robotics and AI fields. Diego was also a University (tenure track) professor and robotics researcher for 8 years, till 2012, when he quit academia to try to build a C/C++ dependency manager and co-founded a startup. Since then he mostly develops in Python. Diego is a conan.io open source C/C++ package manager co-creator and maintainer, now working at JFrog as SW engineer and C/C++ advocate.

 

Luis Martinez de BartolomeLuis Martinez de Bartolome

Luis is a full stack software engineer with more than 13 years of experience. He has spent the last 5 years mitigating the pains of C/C++ development flows & dependency management. Co-founder of Conan and a proudly Frog 🐸, today spends his time developing Conan and its ecosystem, playing ukulele, growing hydroponic lettuces and enjoying his two kids.

 

Cheers,
The CLion Team

image description

Discover more