Questions tagged [clion]

CLion is a cross-platform IDE for C and C++ development.

CLion is a cross-platform C/C++ IDE from JetBrains (you can run it on Linux, Windows and macOS). It natively supports old and new C/C++ language standards, Boost and libc++ libraries, and works with templated code and macros. CLion helps you instantly navigate and refactor your code, with Rename refactoring, Change Signature, Inline, Extract Function / Variable / Constant / Parameter, and others. Code analysis (including Data Flow Analysis and Clang-Tidy) is running while you are typing to ensure code quality.

CLion uses CMake as a project model and handles your changes in CMake files automatically, using all the information from there during code editing and refactorings.

Apart from CMake, CLion supports compilation database and Gradle projects. Currently, you cannot create a new project of these types within CLion, but you can open and manage an existing one with full code insight available.

CLion will enrich your development with an integrated debugger (GDB and LLDB), Doxygen support, various unit testing frameworks, Version Control Systems, and dozens of plugins from the repository to extend its functionality.

Besides C and C++, CLion comes with Python, HTML, JavaScript, Swift Kotlin/Native and some other languages support included.

CLion’s functionality can be extended via IntelliJ Platform API.

Useful links

2813 questions
12
votes
3 answers

How to code/run programs in a Docker container using CLion?

I am a newbie to CLion I found that CLion has support for Docker. I want to do the following: (Refer my Linux OS as A.) (Refer the docker container within A as B.) The library and environments are set up in B. The CLion IDE is running in A. I want…
syko
  • 3,477
  • 5
  • 28
  • 51
12
votes
1 answer

CLion - Carriage return? \r

I am using the CLion IDE and I am trying to do a carriage return. I am doing a print statement in C and have the following syntax: printf("\rHello World!"); which is inside a loop. The loop still prints every Hello World on its own line. There are…
Hatefiend
  • 3,416
  • 6
  • 33
  • 74
12
votes
1 answer

Changing default settings for Cmake configuration in CLion

In the settings for CLion, CMake only appears in Build, Execution, Deployment under project specific settings. It does not exist under Default Settings. Is there a way I can specify a universal CMake configuration such that it is available to all…
Huynh
  • 176
  • 1
  • 11
12
votes
1 answer

Clion sort include statements

Is there a way to sort my #include statements in Clion? Additionally, can I do this automatically every time I save? I didn't manage to find any such functionality or plugin.
Anastasios Andronidis
  • 6,310
  • 4
  • 30
  • 53
12
votes
1 answer

How to import settings into CLion from Intellij?

I'm working with IntelliJ and I have the IDE configured to my needs. I'd like to transfer these settings to CLion. Is this possible? If so, how? On the official sites there is no info on that so I'm assuming I'd have to do it by hand (using the…
PsiX
  • 1,661
  • 1
  • 17
  • 35
12
votes
2 answers

use pre-compiled tensorflow with cmake

I've got a c++ project set up in CLion that uses CMake. I am using various 3rd party libraries and would like to also integrate Tensorflow. I've tried bazel to compile Tensorflow to a shared library libtensorflow.so which kind of worked however…
Amelse Etomer
  • 1,253
  • 10
  • 28
12
votes
2 answers

Large CMake Project loading is slow in CLion

I'm trying to convert several big makefile-based applications to CMake to use CLion on them. Every time I open the project, however, CLion takes about a quarter of an hour to load the CMake project, while the memory indicator stays below "750 of…
pesche
  • 3,054
  • 4
  • 34
  • 35
12
votes
2 answers

How to navigate to source code in linked libraries in Clion?

I have a project that links multiple static libs (e.g. libModule.a). When I try to navigate to classes inside the Module lib, Clion takes me only to the header declaration and stops navigation there. I want to be able to dig into the definition of…
abhijit
  • 345
  • 1
  • 3
  • 11
12
votes
2 answers

How to make Ctrl+V work in CLion

I am having difficulty getting Ctrl+V to paste code in CLion (I am using version 1.1.1 for Windows). When I try to paste code copied using Ctrl+C from e.g. a website or another program, it only seems to work occasionally. Usually it pastes a piece…
Paul Boddington
  • 37,127
  • 10
  • 65
  • 116
12
votes
3 answers

How to enable all compiler warnings in CLion?

I want to see all compiler warnings in CLion. I don't want them treated as errors, but I want to inspect all of them. How can I do this?
a06e
  • 18,594
  • 33
  • 93
  • 169
12
votes
2 answers

Using Qt inside Clion

I'm trying to use Clion IDE to compile a simple program using Qt library, but I can't figure out how to configure CMakeLists.txt file. (I'm not familiar with cmake and toolchain) this is my current CMakeLists.txt file: cmake_minimum_required(VERSION…
Kian Ahrabian
  • 911
  • 2
  • 8
  • 20
12
votes
2 answers

How do you capture console output under debug in clion?

I'm using clion to write a console application. If I simply run the program, I can see the results of my cout calls. But if I debug it, no output occurs under the Debug Console tab other than my exe's name and Process finished with exit code 0. Is…
jep
  • 747
  • 6
  • 25
11
votes
0 answers

CLion memory usage of running program

Is there a tool in CLion to view the memory usage (statistics) of a running program. I look for something similar like the Diagnostic Tool in Visual Studio. With that it is possible to view the Process Memory over time and get the maximum. Is this…
evolved
  • 1,850
  • 19
  • 40
11
votes
1 answer

Is it possible to include the cpp-reference.com documentation into clion's quick documentation viewer?

The provided documentation for the basic c++ packages within clion seems to be very short, and sometimes it is not possible to find any documentation for basic functions like e.g. the tangens function of the math package. Is it somehow possible to…
Sebastian
  • 222
  • 1
  • 9
11
votes
3 answers

CLion Restrict Debugging Step Into to Project Functions only

Is there a way in CLion 2017 to step into project source files only whilst debugging a program? For example in the code segment below, function1 (boost::doSomething()) I have a function from an external library (e.g. boost) which I don't want the…
user3079474
  • 1,653
  • 2
  • 24
  • 37