Windows installation CLion tutorial and simple use, with detailed illustrations

1. Download Clion

Go to JetBrains official website to download
Clion , the page is as follows, click to download

2. The installation is very simple, just keep going to next. Next, mingw must be installed, otherwise the code cannot run

3. Install MinGW


After the installation is successful, open the software and you will be prompted that Toolchains are not configured Configure, so you need to install a compiler such as MinGW or Cygwin or Visual Studio. It is recommended to install MinGW here

Method 1. Directly download and install MinGW

① Download MinGW

Open the
MinGW download page

Don't click the green button, slide down all the way, find the compressed package, click to download

Unzip the downloaded compressed package, remember the path where the decompressed files are stored

② Configure Clion

Open Clion, click configure, or select File-Settings-Build-Toolchains

Click the + sign and select MinGW

Enter the path of the MinGW decompressed file in the Environment, and then the following will be automatically entered. If it cannot be automatically entered, it can also be entered manually:

Make:

#解压文件路径# + \bin\mingw32-make.exe

C Compiler:

#解压文件路径# + \bin\gcc.exe

C++ Compiler:

#解压文件路径# + \bin\g++.exe

Debugger:

#解压文件路径# + \bin\gdb.exe

Finally click OK

③Simple use of Clion to create C language projects

If the output is:

It means that Clion is installed successfully!

Method 2: Use Dev cpp to install

① Install Dev cpp

First download the Dev from this website

choose english

In this way, Dev cpp will be installed successfully.

② Configure Clion

Open the configuration page of Clion in the same way as method 1

Enter in Envieonment

#Dev cpp安装路径# + \MinGW64

If Dev cpp uses the default path, enter in Envieonment:

C:\Program Files (x86)\Dev-Cpp\MinGW64

The rest will generally be entered automatically. If it cannot be entered automatically, it can be entered according to the rules of Method 1. Here are my results:

Then create a C project and run it according to method 1. If the following page is output, the configuration is successful!

Commonly used shortcut keys

hot key illustrate
Ctrl+/ 或 Ctrl+Shift+/ Comments (// or /.../)
Shift+F6 double naming
Ctrl+X Delete line saved to clipboard
Ctrl+Y delete a line
Shift+Enter Start over on the next line (no matter where the cursor is)
Ctrl + Shift + Enter restart the previous line (no matter where the cursor is)
Ctrl+D copy line
Ctrl+G find row
Ctrl+Shift+Up/Down Code moves up/down.
F2 or Shift+F2 Highlight errors or warnings for quick location
Ctrl+Shift+F7 Highlight the selected text, press Esc to highlight disappear
Ctrl+B or Ctrl+left mouse button Quickly open the class or method at the cursor
Ctrl + Alt + B jump method implementation
Ctrl + Shift + I Open definition quick lookup
Alt + Up/Down Jump to previous/next method
Ctrl+E recently opened files
Alt+F1 Find where the code is located
Ctrl+Alt+L format code
Ctrl+R replace text
Ctrl+Shift+R Batch code replacement in the specified directory
Ctrl+Shift+F Batch search for codes in the specified directory
Ctrl+F find text
Ctrl+P Method parameter prompt
F3 find next
Shift+F3 find previous
Alt+Shift+F Add current file to favorites
Ctrl+Alt+S Open configuration window
Ctrl+Shift+N Quickly find files in the project by file name (required)
Ctrl+Shift+Alt+N Find the location quickly by one character (required)
Shift+Enter Start a new line (no matter where the cursor is)
Ctrl + Alt + T Surround selected code blocks with if, else, try, catch, for, etc.
Ctrl + Shift + U Switch the case of the word at the cursor position
Ctrl + Delete delete to end of word
Ctrl + Backspace delete up to word start
Ctrl + E Pop up recently opened files
F11 Switching bookmarks is the F2 of sublime text
Ctrl + Shift + F12 Toggle maximized editor
Alt + Shift + F add to favorites

Guess you like

Origin blog.csdn.net/2301_77835649/article/details/130615580