Installing CLion and the MinGW Environment on Windows 10
The programming design course for the new semester has officially begun, and it has also been quite a while since I last opened VC 6.0 to write C code. Actually, when I first started learning C, I was not particularly fond of this IDE. Not only did it have few features, but it also frequently displayed errors such as cl.exe being missing, making it especially troublesome to use. Unfortunately, our teacher only taught us to use this outdated software.
So I looked into some other C development software and tried Dev-C++ and VS 2019. The former is about the same as VC 6.0, although it looks slightly better, while the latter can be considered the most powerful IDE for C/C++ development. However, its software suite is simply too large and consumes quite a lot of resources.
Finally, there is the relatively simple CLion, made by JetBrains, but I encountered many difficulties during the installation process.

Installation
A few days ago, I wrote an article titled “Installing and Configuring IntelliJ IDEA on Windows 10”. I’ll directly follow that approach in this article. It should be noted that CLion is commercial software, unlike IDEA, so there is no Community Edition.
Open the official download page: https://www.jetbrains.com/zh-cn/clion/download

Start installing CLion

I change the installation path as usual to make version management easier (Did anyone who read the previous article notice that my disk has gotten bigger? Hahaha 😭)

I’m used to leaving all file extensions unassociated


The installation is starting

Done. Check Run CLion and click Finish to continue the configuration

Yes, I don’t have a configuration file. Select Do not import settings

There is a new user agreement here, and you must agree to it before you can continue using the software (Be sure to remember that CLion is commercial software. If you use it commercially for a company, absolutely do not download a cracked version, or you may receive a lawyer’s letter.)

Next, it asks to collect some usage reports. If you don’t have much privacy to worry about, go ahead and agree

Set the theme. Light is not too unpleasant to look at

Configure the components. Since none of them are useful to me, I’ll turn them all off

The plugins can also all be left uninstalled by default and downloaded later when needed

Next is some information related to licensing. Those without a license can select Evaluate for free and use it for a period of time

Fortunately, I have a student license, hahaha 😄

MinGW
Next is the part of the whole process that took up the most of my time. Here, you need to configure MinGW, Cygwin, Visual Studio, WSL, or Remote Host; choosing one is enough. I chose MinGW and happily went to download it

As it turned out, the MinGW official website provided a very small executable program, which I didn’t realize was an online installer. It connected to overseas servers, with a download speed of only a dozen KB per second. After half an hour, the progress bar had not even reached halfway, and I was nearly at a loss. Even using a VPN could not speed it up
Later, after reading many similar articles, I finally found a solution. Open https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/

Whatever you do, don’t click the green Download button. Scroll down and find x86_64-posix-sjlj, then download it

The files are explained below:
- MinGW-W64-install.exe: online installer
- x86_64 is the version for 64-bit systems
- i686 is the 32-bit version
- A suffix of seh indicates pure 64-bit compilation
- A suffix of sjlj supports both 32-bit and 64-bit compilation; the -m32 or -m64 parameter must be added
- posix is generally used for cross-platform development and has somewhat better compatibility than win32
After downloading, you will have a 7z archive. Extract it and place it in a non-desktop path, then add a MinGW in CLion and select the path mentioned above

Finally, you can click Start using CLion
Comments
(1)你好, 请问可以把那个mingw文件发我一下吗, 现在下不了了,应该被墙了, 谢谢 2464362485@qq.com