简体   繁体   English

我现在有msys2可以在mingw上删除以前安装的实例吗?

[英]can I delete previously installed instance on mingw now that i have msys2?

I am attempting to learn c++ programming. 我正在尝试学习c ++编程。 I am writing these programs on Windows Vista using the Codeblocks IDE, but since I was to learn Linux, I would like to learn to write my programs with as much portability as I can. 我正在使用Codeblocks IDE在Windows Vista上编写这些程序,但是因为我要学习Linux,所以我想学习尽可能多的可移植性来编写我的程序。

I already downloaded the mingw compiler to use with Codeblocks, but while trying to download the GTK dependencies to try playing around with GUI, I downloaded msys2. 我已经下载了mingw编译器以与Codeblocks一起使用,但在尝试下载GTK依赖项以尝试使用GUI时,我下载了msys2。 I noticed that this program also has you to download Mingw32 and or mingw64. 我注意到这个程序也让你下载Mingw32和/或mingw64。 Are these packages complete enough that I can delete my previous instance of mingw, or do I need to keep the other mingw package that I had already downloaded in order to compile and run my programs? 这些包是否足够完整,我可以删除我以前的mingw实例,或者我是否需要保留我已下载的其他mingw包以编译和运行我的程序?

Yes, MSYS2 is a complete development environment with a package manager, compilers, and build tools. 是的,MSYS2是一个完整的开发环境,包含包管理器,编译器和构建工具。 You do not need to have any kind of external tools installed in order to develop portable C++ code with MSYS2. 您不需要安装任何类型的外部工具即可使用MSYS2开发可移植的C ++代码。

Keep in mind that MSYS2 supports three different subsystems. 请记住,MSYS2支持三个不同的子系统。 You select which subsystem to use when you click on one of the three shortcuts in the start menu for starting a shell. 您可以选择在开始菜单中单击三个快捷方式之一时用于启动shell的子系统。 The Win64 and Win32 shells, and their compiler toolchain packages mingw-w64-x86_64-toolchain and mingw-w64-i686-toolchain , allow you to write native Windows applications that just depend on a few runtime DLLs. Win64和Win32 shell及其编译工具链包mingw-w64-x86_64-toolchainmingw-w64-i686-toolchain允许您编写仅依赖于一些运行时DLL的本机Windows应用程序。 The MSYS2 shell allows you to write applications that depend on msys-2.0.dll, which is a fork of Cygwin that provides better emulation of POSIX (so programs designed for Linux are more likely to work). MSYS2 shell允许您编写依赖于msys-2.0.dll的应用程序,msys-2.0.dll是Cygwin的一个分支,可以更好地模拟POSIX(因此为Linux设计的程序更有可能工作)。 If you want your code to be portable, I think you want it work in all three of those environments. 如果您希望您的代码可移植,我认为您希望它在所有这三种环境中都能正常工作。 You can also use VirtualBox or VMware to install Linux on your machine and develop your code in a virtual machine. 您还可以使用VirtualBox或VMware在计算机上安装Linux,并在虚拟机中开发代码。

Find gcc in your msys-git directory and you'll know. 在msys-git目录中找到gcc,你就会知道。 Normally, it is missing and in this case, you should keep your full mingw setup. 通常情况下,它会丢失,在这种情况下,您应该保持完整的mingw设置。 Also, if you want an real linux emulation, use cygwin, not mingw wich just provide a compiler (but not the Linux syscalls etc.) 此外,如果你想要一个真正的linux仿真,使用cygwin,而不是mingw只提供一个编译器(但不是Linux系统调用等)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM