In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how mingw mimics the linux development environment. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
MinGW installs MSYS by default. Usually open MinGW Shell actually exists as a component MSYS,MinGW.
MSYS-- Minimal SYStem, is a Bourne Shell interpreter.
MinGW-- Minimalist GNU for Windows. A development environment based on native windows, not a virtual machine.
Take the root directory of the MinGW installation as D:\ MinGW\ as an example.
1. Mount the file system
Mounting to MSYS is easy to use, and the new version of MinGW is automatically mounted by default.
For other folders, you can mount them automatically in the same way.
Configuration file D:\ MinGW\ msys\ 1.0\ etc\ fstab, mount configuration one by one. Format of "original path mount location".
As follows:
The code is as follows:
D:\ MinGW\ / mingw
D:\ / home/jackon/d
There is only the first line by default, so only MinGW is automatically mounted.
It's best to leave a blank line at the end. Because, manually mounted information will also be written to fstab, and will not start writing on another line.
Note when mounting manually:
1. All paths should be in linux format'/'
two。 The destination path of the mount uses an absolute path, and you need to ensure that the path exists.
The screenshot of the manual mount process is as follows.
two。 Third-party library installation
You can compile and install from the source code, or you can place the compiled executable in the D:\ MinGW\ msys\ 1.0\ bin directory.
The code is as follows:
. / configure-- prefix=/mingw
Make
Make install
3. Associate vim under windows
Alias a command to point to the windows executable in the D:\ MinGW\ msys\ 1.0\ etc\ profile file.
Note that if there are spaces in the path, you need to use the escape character'\'. For example, associate an external vim
The code is as follows:
Alias vim= "/ C/Program\ Files/Vim/vim73e/vim.exe"
When vim is started, the local configuration file is not used. You can copy a copy of the vim configuration file to the MSYS directory.
Did not find a way to modify runtimepath before startup-try mounting or soft link
4. Display control
The configuration information can be changed by modifying D:\ MinGW\ msys\ 1.0\ etc\ profile, which is the same as linux's profile file. Jackon@windows controls the display of text,\ u uses the local user name, and\ h displays the host address.
The code is as follows:
Export PS1='\ [\ 033] 0politics MSYSTEM:\ w\ 007
\ 033 [32m\] Jackon@windows\ [\ 033 [33m\ w\ 033 [0m\]
$'
Thank you for reading! This is the end of the article on "how mingw imitates the linux development environment". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.