Multiple methods to build a C Language Development Environment on the Windows platform
How to build a C language development environment is worth thinking about and sorting out
Note: The knowledge in this article comes from building a C language integrated development environment on the Windows platform-geek College
1. Configure the GNU environment on the Windows platform
Ii. Use Sublime Test on Windows to develop C Language Programs
3. C language program development using Visual Studio on Windows
IV,Build an integrated development environment for EclipseCDT on Windows
V,Build a Clion integrated development environment on Windows
1. Configure the GNU environment on the Windows platform
GNU http://www.gnu.org/
Select the following GNU environment to download and install it to drive C:
1. MinGw
Download installation http://www.mingw.org/
Send C: \ MinGW \ msys \ 1.0 \ msys. bat to the desktop shortcut
Enter gcc in the msys. bat command box to get sh: gcc: command not found.
No environment variables are configured at this time.
Open C: \ MinGW \ msys \ 1.0 \ etc \ profile in the editor
Add export PATH =/C/MinGW/bin: $ PATH to the end of the last line to save and re-open msys. bat.
Enter cd/c/Users/user name/Desktop in the Command box to enter the Desktop
(Write hello. c In the editor on the desktop)
After entering gcc hello. c In the command box, the compiled hello.exe will be automatically generated at the table.
Enter./hello.exe in the Command box and execute hello.exe directly.
2. cygwin
Official website download and Installation Https://cygwin.com/
Search for gcc under Select Packages during the download and installation process, and check gcc-core and gcc-g ++ for installation.
Then, run the Cygwin64 Terminal command box on the desktop shortcut.
Enter gcc in the Command box and the prompt "gcc: Fatal error: no input file compilation interruption. "Indicates that gcc already exists and is still prompted in Chinese.
Enter/cygdrive/c/Users/user name/Desktop in the Command box to enter the Desktop
(Write hello. c In the editor on the desktop)
Enter gcc hello. c In the command box and generate a.exe on the desktop.
If you enter./a.exe in the Command box to obtain the running result, the environment is successfully set up.
Appendix: If the. exe file compiled by cygwinis input in the program, the system prompts "unable to start this program because cygwin1.dll is lost in the computer. Try to reinstall the program and solve the problem"
(Cygwin1.dll is a dynamic library used to simulate the Linux environment in cygwin environment. It can map Linux APIs to Windows APIs to execute Windows programs)
Two solutions:
① Configure the environment variable set PATH = % PATH % in cmd; C \ cygwin64 \ bin
②. Find cygwin.dllunder C \ cygwin64 \ binand copy it to the table. Then execute a.exe to get the result.
(Cygwin.dllis a large and small package with a large number of APIs and 3 Mbit/s, which must be depended on by the. exe generated by cygwintherefore, the two must be placed in the same directory)
Ii. Use Sublime Test on Windows to develop C Language Programs
Download and install Sublime http://www.sublimetext.com/
If the. c file is compiled, Run the Run (shortcut: Ctrl + Shift + B) command under Tools in the Sublime menu bar, and the Error 2 is returned:
This is because Sublime is based on the Windows platform and does not have the GNU environment.
Because sublime test 2.0.2 is used, enter cd/cygdrive/c/Program \ Files/Sublime \ Text \ 2/In MinGW or Cygwin/
Enter run sublime_test.exe to enable Sublime Test 2 in the GNU environment. Then, the opened Sublime Test is in the GNU environment.
3. C language program development using Visual Studio on Windows
VS Official Website https://msdn.microsoft.com/zh-cn/default.aspx find download-Visual Studio
VS can be installed online. You can also right-click the iso file and load it to the virtual optical drive. Select your own download method as needed.
After installation, find the Visual Stdio tools in Visual Stdio 2013 on the menu bar and you will be able to see many command line tools.
Here, the version directory is: Microsoft Visual Studio 14.0 \ Common7 \ Tools \ Shortcuts start vs new project-Save and run. Appendix: Open the developer command and prompt line cd to enter the desktop and enter cl hello. c will generate hello.exe and hello. obj input hello.exe execution to get the running result (cl compiler, a C language compiler developed by Microsoft, so compiling C in windows is very compatible. Gcc should consider cross-platform, and the speed in windows is not as high as cl)
IV,Build an integrated development environment for EclipseCDT on Windows
Official Website http://www.eclipse.org/select Eclipse IDE for C/C ++ Developers after download is complete directly decompress the modification folder name cdt inside the eclipse.exechange to cdt.exe open cdt.exe will pop up prompt to find jre because eclipse is developed using java language, so need go to the http://www.oracle.com/download java for developers click download jdk after installation can start eclipse attachment: configure the GNU environment before installing Elclipse: The system prompts that the make error cannot be found during compilation.
CygwinDuring the download and installation process, Select cmake make under Select Packages to install cmake. After installation is complete, enter the make command in cgwin to test the running process and the system prompts an error. This is because the opening method is incorrect. Open cdt.exe from cygwinor copy a cygwin. dll file in the source code directory.
V,Build a Clion integrated development environment on WindowsDownload Clion is a smart cross-platform development environment installation process will prompt to select the GNU environment, configure the installation can be