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.
- Diego’s demo project is available on GitHub
- Conan-CMake project to call Conan from CMake
- Conan documentation
- Cross-compilation docs
- Mastering profiles with Conan
- 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
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’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 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.
The CLion Team
Subscribe to Blog updates
5 Approaches to Remote C++ Development With CLion – Webinar Recording
The recording for our webinar, 5 Approaches to Remote C++ Development With CLion, with Matt Ellis and Timur Doumler, is now available for you to watch. Subscribe to our community newsletter to receive notifications about future webinars. Webinar agenda The webinar consists of the following parts: …
Join the Webinar – 5 Approaches to Remote C++ Development With CLion
Join us on Tuesday, July 26, 2022, 3:00 pm – 4:30 pm UTC (check other timezones) for our free live webinar, 5 Approaches to Remote C++ Development With CLion. REGISTER NOW and get a reminder, or join us on YouTube. In this webinar, JetBrains developer advocates Matt Ellis and Timur Doumler will show…
Testing Superpowers: Using CLion to Add Tests Easily – Webinar Recording
The recording of our webinar, Testing Superpowers: Using CLion to Add Tests Easily, with Clare Macrae, is now available. Subscribe to our community newsletter to receive notifications about future webinars. This webinar was produced in response to a question someone asked in Arne Mertz’s "Refac…
Live Webinar, Testing Superpowers: Using CLion to Add Tests Easily
CLion is great for refactoring C++ code to make it more maintainable. But as someone asked in Arne Mertz's "Refactoring C++ Code" webinar, "What can we do if we don’t have tests on the project and can’t easily check the changes introduced by refactorings?" In this webinar you wil…