当前位置:网站首页>Download and installation configuration of cygwin
Download and installation configuration of cygwin
2022-07-01 03:38:00 【Three Belle Wenzi】
Catalog
2. Cygwin The building blocks of
Two 、 Cygwin Download and install
3、 ... and 、 Configure environment variables
1. Remove services already installed on your computer
2. Stop all on the computer about Cygwin The background program of
3. Delete Cygwin root directory
5. Delete system environment variable path Item in
6. Delete the key in the registry
One 、Cygwin Introduce
1. What is? Cygwin
Cygwin It's a windows Classes running on the platform UNIX Simulation environment , yes cygnus solutions company-developed The free software ( The famous tools developed by the company include eCos, But now it has been Redhat Acquisition ). It's for learning UNIX/Linux Operating environment , Or from UNIX To Windows Application porting for , Or do some special development work , Especially in use GNU The toolset is in Windows on Embedded system development , Very useful . With the development of embedded system, it becomes more and more popular in China , More and more developers are interested in Cygwin There was interest .
Cygwin Provide a UNIX simulation DLL And a variety of functions built on its upper layer Linux Software packages found in the system , stay Windows XP SP3 The above versions provide good support .Cygwin Mainly by Red Hat And its subordinate communities are responsible for maintenance .
Then you will ask , stay Windows Installation on Cygwin What is it ? What's the use of ? In fact, it is very useful , Like we're using eclipse When the platform is developing plug-ins , Suppose you are going to make one in eclipse Can compile on the platform C/C++ Integrated development environment of program ( Plug in ), Then you need to use the plug-in CDT, Be similar to Java Development environment plug-ins JDT, So you are in eclipse There are plug-ins CDT, You need your computer to run gcc、g++、gdb Wait for your order , here , our Cygwin It works ,【 If you want to be in eclipse Develop a C/C++ Integrated development environment , Then you need to combine :eclipse + CDT plug-in unit + Cygwin】.
2. Cygwin The building blocks of
Cygwin Including a set of libraries , The library is located in Win32 Under the system POSIX system call Of API; There's another set GNU Development toolset ( such as GCC、GDB), In this way, simple software development can be carried out ; Some more UNIX Common programs under the system .2001 year , Added X Window System.
Another one is called MinGW The library of , Can follow Windows The local MSVCRT library (Windows API) Working together .MinGW Take up memory 、 Hard disk space is relatively small , Ability to link to any software , But it's right. POSIX The implementation of the specification does not Cygwin The library is complete .
But the bad thing is ,Cygwin I won't support it Unicode. actually , Except for the present Windows System and OEM codepages( for example , A Russian user , His code page is CP1251 and CP866, And can't be KOI8-R、ISO/IEC 8859-5、UTF-8 etc. ),Cygwin No other character sets are supported .Cygwin The newer version of can meet the display requirements through the settings of the built-in terminal simulator UTF-8 And more code page functions .
Red Hat Regulations ,Cygwin Library compliance GNU General Public License, But it can also be linked to free software that meets the definition of open source .Red Hat There are also expensive license agreements , Use this way Cygwin Proprietary software for the library , It can be republished .
3. Cygwin How it works
cygnus First of all gcc,gdb,gas And other development tools , Enable them to generate and interpret win32 The target file of . then , They want to transplant these tools to windows Get on the platform . One solution is based on win32 api Make major changes to the source code of these tools , This obviously requires a lot of work . therefore , They took a different approach —— They wrote a shared library ( Namely Cygwin dll), hold win32 api Not found in unix Style call ( Such as fork,spawn,signals,select,sockets etc. ) Encapsulated inside , in other words , They are based on win32 api Wrote a unix Simulation layer of system library . such , Just connect the source code of these tools with this shared library , You can use unix Host computer Cross compiler To generate windows The toolset running on the platform . With these transplanted to windows Based on the development tools on the platform ,cygnus And gradually put other tools ( There is little need to modify the source code , Just modify their configuration scripts ) The software is ported to windows come up . such , stay windows Run on the platform bash And development tools 、 User tools , It feels like unix To work on .
Two 、 Cygwin Download and install
In the first section we know Cygwin The function is in Windows Similar to the implementation UNIX Operating system compilation and debugging simulation environment , That is to say Windows Can also be used on gcc、g++ To compile the program . So in this section , Let's learn about this Cygwin Installation process :
First step : download Cygwin Installation, Open after download setup-x86_64.exe file , The following screen appears .

Click on “ next step (N)” Show me the interface , On this interface , We can see that there are three installation modes , Namely :
- Install from Internet: This model is directly from Internet Installed , Suitable for computers with internet ;
- Download Without Installing: This model can only be downloaded from the Internet Cygwin The component package of , But not installed ;
- Install from Local Directory: This mode corresponds to the second mode above , When your Cygwin The component package has been downloaded locally , You can use this mode to install... Locally Cygwin.
Choose the appropriate installation mode from the above three modes , Let's start with the first mode , Install directly from the Internet , Of course, while downloading ,Cygwin Components are also saved locally , It is convenient to install again in the future , After selection , Click on “ next step (N)”.

The second step : choice Cygwin Installation directory , And some parameter settings . The default installation location is C:\cygwin\, You can also choose your own installation directory , And then choose “ next step ”, Xiaobian is installed in D:\IDE\Cygwin\Source.

Next, we can choose to download from the Internet during the installation process Cygwin Save location of component package , After selection , Click on “ next step ”, Xiaobian places the component package to be saved in D:\IDE\Cygwin.

The third step : This step selects the connection method , Choose your connection method , And then click next , A dialog box for selecting a download site will appear , As shown in the figure below .

This step selects the first 163 The mirror website provided can , The download speed in China is very fast , If there are other images , You can enter URL after , Click on “Add” Add , Then select... In the list . After selection , Click on “ next step ”, After downloading several files, the following interface appears :

Step four : Enter the following interface , Here is the download from this interface. We need to compile C/C++ Code Packages, We just need to download “Devel” Just branch off a few packages :
gcc,
gcc-core,
gcc-g++,
gcc-mingw-core,
gcc-mingw-g++,
make ,
gdb,
binutils
In the picture above search Box gcc, The program will automatically search , Here's the picture , By choice “Devel” Package under Branch , Find and install the package we need , And then click Skip To choose the latest installation package .

Step five : Waiting for the installation , The installation time depends on the components you choose and the network . After installation , The installer will prompt if you want to create... On your desktop Cygwin Icon, etc , Click Finish to exit the installer .

installation is complete :

3、 ... and 、 Configure environment variables
Open the environment variable on the computer , Then, in the system variables field path Add in variables Cygwin Under the installation path of bin route :

After configuring environment variables , Open command window Win+R, Input gcc perhaps g++, If it does not appear, if displays “ Access denied ” (access denied), It means the installation is successful , If appear “ Access denied ” (access denied), So the solution is : Get into cygwin The installation directory \bin Lower inspection g++.exe, gcc.exe Whether only 1k size , If it is , Then the file is a symbolic link , Then rename the file ( Backup ). And then put g++-3.exe( perhaps g++-4.exe) Copy a , Rename it to g++.exe. hold gcc-3.exe Copy a , Rename it to gcc.exe.

Four 、 Cygwin The uninstall
Uninstall completely Cygwin, because Cygwin The installer for does not provide the option to uninstall , So we need to delete it manually Cygwin The relevant documents of . The methods recommended on the official website are as follows :
1. Remove services already installed on your computer
In the installation Cgywin Common services may be installed when , image sshd、cron、cygserver、inetd、apache、postgresql etc. , Delete these services .
2. Stop all on the computer about Cygwin The background program of
Stop the background running on the computer Cygwin Program , Make sure that there is no problem that the file cannot be deleted when it is deleted .
3. Delete Cygwin root directory
The default is C:\Cygwin, Delete the entire directory . If the prompt file is occupied, it cannot be deleted , Check carefully to see if there is Cygwin The relevant program is still running , If you can't, just restart and delete .
4. Delete shortcut
Delete the shortcuts on the desktop and in the start menu .
5. Delete system environment variable path Item in
If environment variables are added during installation , Then we need to delete these items manually . Main inspection path Are there any and Cygwin Related items .
6. Delete the key in the registry
Open registry editor ( Can be found with the search function ), Respectively in HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER Find below Software , And then in Software Find Cygwin , Just delete this item .
边栏推荐
- TEC: Knowledge Graph Embedding with Triple Context
- Feign remote call and getaway gateway
- 4. [WebGIS practice] software operation chapter - data import and processing
- Edlines: a real time line segment detector with a false detection control
- leetcode 1482 猜猜看啊,这道题目怎么二分?
- 【伸手党福利】开发人员重装系统顺序
- Finally in promise
- Server rendering technology JSP
- The shell script uses two bars to receive external parameters
- Promise中finally的用法
猜你喜欢

雪崩问题以及sentinel的使用

报错:Plug-ins declaring extensions or extension points must set the singleton directive to true

Learning notes for introduction to C language multithreaded programming

Server rendering technology JSP

不用加减乘除实现加法

Hello World generation

EDLines: A real-time line segment detector with a false detection control翻译

二叉树神级遍历:Morris遍历

完全背包问题

后台系统页面左边菜单按钮和右边内容的处理,后台系统页面出现双滚动
随机推荐
Golang multi graph generation gif
Appium自动化测试基础--补充:C/S架构和B/S架构说明
Pyramid scene parsing network [pspnet] thesis reading
Learning notes for introduction to C language multithreaded programming
Research on target recognition and tracking based on 3D laser point cloud
Edge drawing: a combined real-time edge and segment detector
FCN全卷积网络理解及代码实现(来自pytorch官方实现)
Bilinear upsampling and f.upsample in pytorch_ bilinear
Feature Pyramid Networks for Object Detection论文理解
go实现命令行的工具cli
10、Scanner.next() 无法读取空格/indexOf -1
过滤器 Filter
Subnet division (10)
C语言的sem_t变量类型
Listener listener
Ridge regression and lasso regression
RSN:Learning to Exploit Long-term Relational Dependencies in Knowledge Graphs
JS日常开发小技巧(持续更新)
文件上传下载
不用加减乘除实现加法