当前位置:网站首页>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 .
边栏推荐
- Feature pyramid networks for object detection
- ECMAScript 6.0
- Pyramid Scene Parsing Network【PSPNet】论文阅读
- Go tool cli for command line implementation
- Leetcode 1482 guess, how about this question?
- Valid brackets (force deduction 20)
- 打包iso文件的话,怎样使用hybrid格式输出?isohybrid:command not found
- TEC: Knowledge Graph Embedding with Triple Context
- Database DDL (data definition language) knowledge points
- Keil5中如何做到 0 Error(s), 0 Warning(s).
猜你喜欢

LeetCode 144二叉树的前序遍历、LeetCode 114二叉树展开为链表

数据库中COMMENT关键字的使用
![5. [WebGIS practice] software operation - service release and permission management](/img/5d/070e207bd96e60ba1846d644d4fb54.png)
5. [WebGIS practice] software operation - service release and permission management
![[us match preparation] complete introduction to word editing formula](/img/e4/5ef19d52cc4ece518e79bf10667ef4.jpg)
[us match preparation] complete introduction to word editing formula

RSN:Learning to Exploit Long-term Relational Dependencies in Knowledge Graphs

LeetCode 128最长连续序列(哈希set)

不用加减乘除实现加法

Basic concepts of database

还在浪费脑细胞自学吗,这份面试笔记绝对是C站天花板

4、【WebGIS实战】软件操作篇——数据导入及处理
随机推荐
在 C 中声明函数之前调用函数会发生什么?
文件上传下载
The method to measure the similarity of two vectors: cosine similarity, pytorch calculate cosine similarity: torch nn. CosineSimilarity(dim=1, eps=1e-08)
深度学习中的随机种子torch.manual_seed(number)、torch.cuda.manual_seed(number)
E15 solution for cx5120 controlling Huichuan is620n servo error
Go tool cli for command line implementation
ASGNet论文和代码解读2
TEC: Knowledge Graph Embedding with Triple Context
Cookie&Session
Promise中finally的用法
Appium自动化测试基础--补充:C/S架构和B/S架构说明
Listener listener
Split(), split(), slice(), can't you tell?
The preorder traversal of leetcode 144 binary tree and the expansion of leetcode 114 binary tree into a linked list
实现pow(x,n)函数
Basic concepts of database
RSN:Learning to Exploit Long-term Relational Dependencies in Knowledge Graphs
小程序容器技术与物联网IoT的结合点
idea插件备份表
雪崩问题以及sentinel的使用