Languages can also be added via plugins. It supports HTML, CSS, JavaScript, and XML. Open it with root permission sourses.list fileCLion is a free IntelliJ Platform. Open a terminal window (Alt-F2 to run application, type in mate-terminal or gnome-terminal or konsole) Run the installation command: sudo apt install cmake gcc g++ clang On other linux distribution you'll have to use the default package manager, like yum in rpm-based distributionsAt present, my system is still just installed with ubuntu, so I need to replace it with aliyuan (to facilitate quick download and installation of dependency packages later) # 1.Tick the For all users interface and click start to complete the installation of clion (clion is a paid ide, but you can try it for 30 days first, and you can find a way to activate it yourself!).1.3 configure C/C + + compilation environmentOpen the clion after installing it, as shown in the following figure:To create a New Project, click New Project and jump to the following:Here, create a C++ Executable, which will generate a cmake project in the client. I will move it to the user's directory and decompress it with the following command: $ tar -zxvf CLion-2019.3.6.tar.gzAt this point, the user directory has the following two files:In the current user directory, enter the following command to expand the installation of clion: $ cd clion-2019.3.6/bin/First, the following window will pop up for you to select the configuration file, select Do not import settings, and then click OK.Then you just need to continue until the following interface appears. Here I install version 2019.3.6The installation package downloaded through the Firefox browser in ubuntu should be in the user's Download directory. Enter the following command in the shell to updateStay clion official website Get clion's installation package. Delete the original contents in the file, copy and paste the following aliyuan, save and exitDeb bionic main restricted universe multiverseDeb bionic-security main restricted universe multiverseDeb bionic-updates main restricted universe multiverseDeb bionic-proposed main restricted universe multiverseDeb bionic-backports main restricted universe multiverseDeb-src bionic main restricted universe multiverseDeb-src bionic-security main restricted universe multiverseDeb-src bionic-updates main restricted universe multiverseDeb-src bionic-proposed main restricted universe multiverseDeb-src bionic-backports main restricted universe multiverse# 3.
Clion Ubuntu Free IntelliJ PlatformIf you can install g + + yourself, but it involves some dependent libraries, which is a bit troublesome. Gcc is available by default, but there is no g + +. First close clion, open the command line, and enter the following command to install the c/c + + compilation Kit: # We compile the program on ubuntu. This is because the c/c + + compilation toolchains of clion is not complete (because ubuntu does not install the c/c + + compiler package by default). Clion Ubuntu Code Of TheIf you only need LLVM and clang, you can download only the source code of the second (LLVM) and the third (clang). Obtaining llvm projectGet into llvm Download Interface , my current stable version is updated to 11.0.0, as shown in the following figure:You can see that there are many download links under Sources. We can click File > Settings > build, execution, deployment > toolchain to see that clion has automatically found the gcc, g + + and make just installed, as shown in the following figure:At this point, the construction environment of clion is set up, and then llvm/clang is compiled through clion. It should be that the client has integrated cmake). It is complete and convenient.When you re open the client, you will find that the test project can be built and run (EH, we don't seem to have installed cmake. Clion Ubuntu How To Deal WithSo how to deal with the memory problem? First, I opened the memory of the virtual machine to 12G (the physical machine is 16G), and then mounted an 8G swap partition! According to experience, your memory + swap partition size should be > 16G!!Expand the swap partition size according to the following command: # 1. When I linked to clang, the direct memory burst. At the beginning, I only opened 8GB of memory. The requirements of the official website are as follows:Here we enter the following commands to install in turn: # GCC suite and Make were installed with clion in front of it# Install a git to manage the source code with clionIn this way, the dependency package is loaded! Let's move on to a more important link! It's also the place where I've stepped on the most pits!!Compiling the Debug version of LLVM suite not only requires a lot of memory, but also consumes a lot of disk space!!So first of all, make sure that the disk space of your virtual machine is better than 100G!The next step is memory. LLVM compilation environment configurationCompiling LLVM requires a lot of dependent packages. The directory tree is as follows. Murugan moola mantraIn the CMake configuration window, change the Generate Path to the folder of the build you just created, and add the following options to the content in CMake options:At this time, clion will automatically execute the CMake generation project. To do this, do the following operations: first, click Tools > CMake > Chang project root to change it to the build folder of the same level as llvm then click File > Settings > build, execution, Deployment > CMake to enter the CMake configuration window. Next, compile LLVM/Clang in clion!!! 2.3 compile LLVM/ClangFirst of all, create the build directory under the llvm-project-11.0.0 directory as the build directory $ cd ~/llvm-project-11.0.0/Then open clion, click Open File or Project, select the llvm source code folder, and click OK to open it, as shown in the following figure:At this time, you will enter the "clion", and the "clion" will be based on the "llvm" folder CMakelLists.txt Automatically execute cmake to build a directory cmake build debug, as shown in the following figure:But this is not what we want, we need to configure the parameters of CMake to generate. As shown below, it can be seen that the size of the memory + swap partition in my system is about 20GTotal used free shared buff/cache availableAt this point, the compilation environment is ready. Use the free command to see the size of the swap partition# 5. Format / tmp/swap1 as a swap partition, and it will disappear automatically after restart# 4. Betterzip huffman codThe executable files generated by compiling are stored in the build/bin / directoryAfter 4.5h, the compilation is successful.
0 Comments
Leave a Reply. |
AuthorWilliam ArchivesCategories |