Clion Ubuntu Free IntelliJ Platform
If 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 The
If 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 With
So 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 mantra
In 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 cod
The executable files generated by compiling are stored in the build/bin / directoryAfter 4.5h, the compilation is successful.
Leave a Reply.