Multiple ways to build a C language development environment on the Windows platform

Source: Internet
Author: User

New contact with C language, how to build a C language development environment is worth thinking and organizing

Note: This knowledge comes from the Windows platform to build the C language integrated development environment-geek College

I. Configuring the GNU environment on the Windows platform

Ii. developing a C language program using sublime test on the Windows platform

Iii. developing C language programs using VisualStudio on the Windows platform

Iv. Build ECLIPSECDT integrated development environment in Windows platform

V. build clion integrated development environment in Windows platform

I. Configuring the GNU environment on the Windows platform

GNU http://www.gnu.org/

Select the following GNU environment to download and install to drive C:

1.MinGw

Official website Download Install http://www.mingw.org/

Send C:\MinGW\msys\1.0\msys.bat to desktop shortcut

Entering GCC in the msys.bat command box will get: Sh:gcc:command not found

No environment variables are configured at this time

Open C:\MinGW\msys\1.0\etc\profile with editor

Add export Path=/c/mingw/bin after the last line : $PATH save and reopen Msys.bat

Command box enter cd/c/users/user name/desktop Enter the desktop

(then use the editor to write a hello.c on the desktop)

Command box input gcc hello.c after the desktop will automatically generate the compiled Hello.exe

Command box input./hello.exe direct execution of Hello.exe to get the result of the operation indicates a successful environment

2.cygwin

official website Download install https://cygwin.com/

During the download installation process, search for GCC under Select Packages, check the Gcc-core and gcc-g++ installation

When you are finished, perform the desktop Shortcut Cygwin64 terminal Command box

Command Box input gcc, prompting "GCC: fatal error: No input file compile interrupt." "indicates that GCC already exists and is still a Chinese hint

Command box enter/cygdrive/c/users/user name/desktop go to Desktop

(now write a hello.c on the desktop with the editor)

Command box input gcc hello.c after desktop generation A.exe

Command box input./a.exe The result of the operation indicates that the environment has been successfully built.

Attached: cmd If you enter Cygwin compiled. exe, the system prompts "Unable to start this program because the computer is missing cygwin1.dll." Try reinstalling the program and resolving this issue "

(Cygwin1.dll is a dynamic library in the Cygwin environment that simulates a Linux environment, which can be used to map Linux APIs to Windows APIs to execute Windows programs)

Two workarounds:

①. Configuring the environment variable set path=%path% in cmd; C\cygwin64\bin

②. Find the Cygwin.dll under C\cygwin64\bin and copy to the desktop and execute a.exe to get the results

(Cygwin.dll is dependent on the Cygwin generated by the. exe because it wraps a lot of APIs and is more than 3MB in size, so you need to put both in the same directory)

Ii. developing a C language program using sublime test on the Windows platform

Official website Download Install sublime http://www.sublimetext.com/

writing a. c file directly with the run (shortcut key Ctrl+shift+b) under Tools in the Sublime menu bar will get the error 2 errors:

This is due to the fact that the sublime Windows-based platform does not have the GNU environment

Because this is Sublime test 2.0.2, enter cd/cygdrive/c/program\ files/sublime\ text\ 2 in MinGW or Cygwin.

After entering run Sublime_test.exe can open sublime Test 2 in the GNU environment, when the open sublime test is in the GNU environment

Iii. developing C language programs using VisualStudio on the Windows platform

VS Official Websitehttps://msdn.microsoft.com/zh-cn/default.aspx for download-visualstudio

VS can be installed online, or you can download the ISO right-click on the virtual CD-ROM to install and choose your own download mode as appropriate.

After you locate the menu bar after you have installed the visual Stdio Tools under Visual Stdio 2013, you can see many kinds of command-line tools that open the VS2013 developer command prompt

This version of the directory is: Microsoft Visual Studio 14.0\common7\tools\shortcuts start vs New Project-Save run Attached: Open developer Command prompt line CD into desktop input CL hello.c Generates Hello.exe and Hello.obj input hello.exe execute to get running results (CL compiler, a C language compiler developed by Microsoft, so Windows compile C is well compatible. GCC to consider cross-platform, in Windows slower than CL)

Iv. Build ECLIPSECDT integrated development environment in Windows platform

official website http://www.eclipse.org/select Eclipse IDE for C + + developersAfter the download is complete, directly unzip the folder name CDT change the inside of the Eclipse.exe renamed to Cdt.exe Open Cdt.exe there will be a pop-up hint to find the JRE because Eclipse was developed in the Java language, it needs to enter http://www.oracle . com/download Java for developers click the download JDK JDK after installation to launch Eclipse Attach: Configure the GNU environment before installing ELCLIPSE: You are not prompted to find a make error during compilation CygwinDuring the download and installation process, check packages under Select CMake make installation can be installed in Cgwin to enter the make command during the test run error this is because the open method is incorrect. Open Cdt.exe from Cygwin or copy a cygwin.dll in the source code directory

v. build clion integrated development environment in Windows platform Official website http://www.jetbrains.com/Download Clion Clion is an intelligent cross-platform development environment that prompts you to select the GNU environment during installation to configure the installation

Multiple ways to build a C language development environment on the Windows platform

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.