web123456

Using CLion for linux development on Window side

In the past, regardless of whether you were developing the x86 sidelinuxprogram or arm-side linux program, are using Source Insight as the source code editing tool, as follows

    

Late last year, it was discovered thatCLionThe updated version of 2018.3 can support remote host development now, big love!

    I switched development tools to CLion for the following reasons

1. Syntax highlighting is more obvious, easy to jump around and refactor (I value this);

2. You can use the graphical interface for debugging, much more convenient than the command line GDB;

3. UtilizationcmakeManagement, project directory structure is clear, and support for cmake command highlighting and complement (not used cmake in the past because unfamiliar)

 

CLion development environment deployment:

1. Installation of CLion

Download and install the process will not say, Baidu clion, enter the official website, download the latest version of clion installation can be.

The main point here is to note that the default font size and syntax highlighting are both exceptionally hard to read (mainly because it's not what I'm used to I guess haha)

I have made changes to this, as shown below, the configuration file on the Baidu cloud, like you can download and try to try it ha

Link:/s/13WInKlS6wwPthoY57fW-lA
Extract code: 48vd

Font size and syntax highlighting: (mostly configured based on Source Insight)

    Shortcut modification:(Basic jumping can be done based on the left hand habit of putting the thumb on Alt and using the mouse with the right hand)

a. Go to Definitions Alt + Q

b. Return to previous navigationAlt + 1 

c. Finding utilizationAlt + W

d. Jump to source code Alt + S (Alt + W searches for results, jumps to the first item in the search)

e. Close the search results windowAlt + D

 

2. Configuration tool chain

Go to File | Settings | Build, Execution, Deployment | Toolchains

3. Establishment of the project

How to create a new project will not say, here to share a simple template, its project directory structure and test of the CMakeLists file is as follows

Link:/s/1VjFX0PSVjkdOaDUT6ozlWQ
Extract code: 0bdd

After loading the project, it will automatically upload the project files stored on the window side to the corresponding directory on the linux virtual machine, which can be modified as follows

Sometimes after adding a source file locally, if it will not be uploaded automatically (it can be uploaded at), then you need to upload it manually, which can be done here

 

4. Implementation, debugging procedures

The operation of the graphical interface, there is no more to say, look at the picture all understand ha!