Build C language development environment (Windows platform) summary
- 2020-05-05 11:41:04
- OfStack
New contact C language, how to build C language development environment is worth thinking about and sorting out
1. Configure GNU environment
on Windows platformGNU http://www.gnu.org/
Select the following GNU environment to download and install to C disk:
1.MinGw
website, download and install http: / / www mingw. org/
high-speed download and install this site / / www jb51. net softs / 192011. html
C:\MinGW\msys\1.0\ msys.bat send C:\MinGW\msys\1.0\ msys.bat to the desktop shortcut
type gcc in the msys.bat command box to get: sh: gcc: command found
is not configured with the environment variable
open C:\MinGW\msys\1.0\etc\profile
with the editorbehind the last row to join export PATH = / C/MinGW/bin: $PATH save and re-open msys. bat
Enter cd /c/Users/ username /Desktop into
2.cygwin
website, download and install https: / / cygwin com/
high-speed download and install this site / / www jb51. net softs / 102136. html
search gcc under Select Packages, check gcc-core and gcc-g ++ to install
When is finished, execute the desktop shortcut Cygwin64 Terminal command box
"Means gcc already exists, and it is still in Chinese indicating
command box input/cygdrive/c/Users/user name/Desktop into
desktop
command box enter gcc hello.c desktop after a exe
attachment: if you type Cygwin compiled.exe in cmd, you will be prompted "this program cannot be started because cygwin1.dll is missing from your computer. Try to reinstall the program and fix the problem "
(cygwin1.dll is a dynamic library in cygwin environment used to simulate Linux environment, which can map Linux API to API Windows to execute Windows program)
two solutions:
The environment variable set PATH=%PATH%; C \ cygwin64 \ bin
(cygwin
ii. Development of C language program
on Windows platform using Sublime Textwebsite, download and install Sublime http: / / www sublimetext. com/
site high-speed download / / www jb51. net softs / 132432. html
Error , c, Run (Ctrl+Shift+B)
this is because in this case Sublime is based on Windows platform, not GNU environment
since this is sublime test 2.0.2, enter cd /cygdrive/c/Program\ Files/Sublime\ Text\ 2/
in MinGW or Cygwin, run sublime_test.exe opens Sublime Test 2 in GNU, and Sublime Test is
in GNUiii. Development of C language program
on Windows platform using VisualStudio
https VS website: / / msdn microsoft. com/zh - cn/default. Looking for download - VisualStudio
aspx
VS can be installed online; You can also download iso , right click on the virtual drive and install it
After is installed, go to the menu bar and open Visual Stdio tools under Visual Stdio 2013. After opening Visual Stdio tools, you can see many command line tools. Open VS2013 developer command prompt
the directory for the version here is: Microsoft Visual Studio 14.0\Common7\Tools\ Tools\Shortcuts
start vs new project - save and run
attachment: open the developer command prompt line cd to enter the desktop
cl hello.c generates hello.exe and hello.obj hello.exe
(cl compiler, C language compiler developed by Microsoft, so windows compiler C is very compatible. gcc to consider cross-platform, in windows not as fast as cl)
4. Build EclipseCDT integrated development environment
on Windows platform
http website: / / www eclipse. org/choice Eclipse IDE for C/C + + Developers
After downloading directly unzip the folder name cdt change eclipse.exe to cdt.exe
opens cdt.exe will be prompted that jre cannot be found because eclipse was developed in java language
so you need to enter http: / / www oracle. com/download java for developers click download jdk
jdk starts eclipse
attachment: please configure GNU environment:
before installing Elclipse
The error
cannot be found
cygwin
After installing , you can test
by entering make command in cgwin
error
Open cdt.exe from cygwin or copy cygwin.dll from the source directory to
Attach detailed tutorial / / www. jb51. net softjc / 159871. html
5. Build Clion integrated development environment
on Windows platform
website http: / / www jetbrains. Download Clion
com /
Clion is an intelligent cross-platform development environment
installation process will be prompted to select GNU environment, configuration installation
Ok, the tutorial is very detailed, I hope to help you learn to build C language development environment.