当前位置:网站首页>Clion + mingw64 configure C language development environment visual studio installation

Clion + mingw64 configure C language development environment visual studio installation

2022-07-23 10:40:00 It takes time for fish to find water

Try not to have Chinese in the installation directory , used CLion Install the package and MinGW The package download link is placed at the end of the article

CLion install

Clion It's a specially developed C as well as C++ Designed cross platform IDE. It is a IntelliJ Designed for the foundation , It includes a lot of intelligent functions to improve the productivity of developers . This powerful IDE Help developers in Linux、OS X and Windows Come up and develop C/C++, At the same time, it can also use intelligent editors to improve code quality 、 Automatic code refactoring and deep integration Cmake Compiling system , So as to improve the working efficiency of developers .

download CLion

Custom installation directory … skip

After installation, click try , New projects

 Insert picture description here

After decompressing Mechanical activity Plug ins are directly dragged into the software . Each time you start the software, the activation time will be reset

MinGW

MinGW, namely Minimalist GNU For Windows. It is a collection of header files and port Libraries , This collection allows people to use... Without a third-party dynamic link library GCC(GNU Compiler C) produce Windows32 Program .

actually MinGW Not one C/C++ compiler , It's a set of GNU Tool set . Apart from GCC (GNU Compiler collection ) outside ,MinGW It also contains some other GNU Programming tools ( such as gawk bison wait ).

download , This link is slow to download

 Insert picture description here

Download after decompression , take bin Directory configuration to environment variables
 Insert picture description here

Test installation

gcc -v
g++ -v

 Insert picture description here

To configure CLion Environmental Science

File>>Settings

 Insert picture description here

 Insert picture description here

newly build C++ project , start-up 、 function
 Insert picture description here

Visual Studio

about CLion Environmental problems cannot be solved , You can also use Visual Studio, The installation compiler comes with its own installation environment , Avoid cumbersome environment configuration . This is downloaded and installed online , The installation package is not provided

Select during installation C++ It can be applied
 Insert picture description here

 Insert picture description here

 Insert picture description here

 Insert picture description here

Right click Source file add to New item

 Insert picture description here

Write code

#include<stdio.h>

int main() 
{
    
	printf("hello world");
	return 0;
}

Generate >> Build solution
 Insert picture description here

Click on debugging >> Start execution , Or use shortcut keys Ctrl + F5 perform
 Insert picture description here

Add

Here we use .cpp file , Don't use .c As a suffix , Because C++ Compatible with most C Language grammar . Of course use .c It's OK, too , It's just that it can't be used C++ grammar
 Insert picture description here

CLion Installation package 、MinGW download

link :https://pan.baidu.com/s/1Bet3ySzBCXQ4o3j5dqy-Dg
Extraction code :7uj9

原网站

版权声明
本文为[It takes time for fish to find water]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/204/202207230409146828.html