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
14
votes
2 answers

How do I properly pass command line arguments to a C program in CLion?

I need someone to outline how to pass command line arguments to CLion. What I've found so far hasn't worked for me. Specifically I need to know how to pass multiple arguments to the program from the command line.
Kevin Cianfarini
  • 649
  • 1
  • 5
  • 11
14
votes
2 answers

CLion infinitely building symbols

When I start CLion, it loads an existing project by itself. It infinitely builds symbols to update indices. It does that even if I stop loading a project. Every time I open a project it infinitely build symbols. I could not find a way to stop the…
LapelCard
  • 177
  • 2
  • 12
13
votes
2 answers

How to switch toolchains in CLion 2018.2?

I started trying to use of CLion 2018.2 today and the first problem with I stuck is how to switch toolchains in CLion. I want to switch the toolchain from MinGW to Visual Studio and I can switch it by making Visual Studio toolchain as default…
13
votes
2 answers

C++ Debug Window showing " for string variable

To my knowledge I'm initializing a string a fairly normal way and when I debug, the variables window in my IDE (CLion) shows its value as . I have some simple code that results in the issue for the string variable Bob. #include…
Logan
  • 143
  • 1
  • 7
13
votes
3 answers

How to get CLion ot show QString values in when debugging?

Seeing this blew my mind: But it would be really awesome if it actually showed me the value inside it. Is it possible to fix this?
Vadim Peretokin
  • 2,221
  • 3
  • 29
  • 40
13
votes
2 answers

CMake error: 'target is not built by this project'

My CMakeLists.txt file is: cmake_minimum_required(VERSION 3.7) project(OpenCV_Basics) set(CMAKE_CXX_STANDARD 11) set(SOURCE_FILES main.cpp) find_package(OpenCV…
Poodar
  • 145
  • 1
  • 2
  • 7
13
votes
2 answers

How to link library using CMake?

I included library in my C source code. But I get compilation errors. Error: **undefined reference to 'sqrt' **undefined reference to 'atan' How can I link to in CMakeLists.txt?
SEGV
  • 848
  • 1
  • 8
  • 19
13
votes
2 answers

Integrate CLion and Android NDK

Recently I've found CLion. I'm trying to configure it to work with Android ndk: I want it to use the ndk sources and headers. I want it to use the gcc and g++ compiler in the ndk. I want it to use my makefile and not cmake. Couldn't achieve…
Sawel
  • 929
  • 7
  • 17
13
votes
2 answers

Setup Boost in Clion

How to use Boost library in Clion with MinGW ? I have downloaded and unzipped boost_1_60_0.zip to C:\boost_1_60_0. What am I supposed to do now ? Do I have to install something ? Here is my CMakeLists.txt: cmake_minimum_required(VERSION…
dimitris93
  • 4,155
  • 11
  • 50
  • 86
13
votes
6 answers

Run a C or C++ program in CLion as root

I'm trying to run a program written in C/C++ by using CLion 2022.3.2 as superuser. Anyone here knows how to run it as superuser? I'm using CMake.
Mazzy
  • 13,354
  • 43
  • 126
  • 207
13
votes
1 answer

How to go back through the Jetbrains IDE "first time"

I accidentally exited the "complete installation" section of CLion before I managed to finish. I got to this point: When I got here, I realized that I hadn't installed g++ on Cygwin, so I paused to install g++. I also closed the Customize CLion…
Justin
  • 24,288
  • 12
  • 92
  • 142
13
votes
3 answers

Configure C++ Google Style in CLion IDE

This is a rather easy matter in IntelliJ (and setting up PEP8 in PyCharm), but I have been googling and I couldn't find a configuration file (I presume in XML or whatever CLion uses) that I could use to configure it to adhere to the Google style…
Marco Massenzio
  • 2,822
  • 1
  • 25
  • 37
13
votes
1 answer

Why am I not able to use relative path to open a file in CLion?

I seem to get errors when trying to open an std::ifstream if I use a relative path. Though it works fine if using an absolute path. Is there something I need to add to the CMakeLists.txt? (I'm pretty new to using cmake) Or is it just a problem in…
SuperWig
  • 155
  • 3
  • 14
13
votes
1 answer

How to change include dirs, library dirs and libraries with CLion

In CLion, how can I specify the include directories where the C++ compiler will look for header files? Also, how do I setup the libraries to link against, and their library directories? Currently I'm doing those tasks modifying directly the file…
Daniel
  • 21,933
  • 14
  • 72
  • 101
12
votes
1 answer

Can't use a library installed with VCPKG in CLion

I followed the tutorial described in the VCPKG github site and then installed OpenMesh 8.0, and after, i linked the toolchain -DCMAKE_TOOLCHAIN_FILE=/home/diolante/vcpkg/scripts/buildsystems/vcpkg.cmake in Clion toolchain settings and when I…
FourZeroFive
  • 145
  • 1
  • 12