MinGW (Minimalist GNU for Windows) is a software development environment that allows you to create native Windows applications using GCC (GNU Compiler Collection). It is a port of the GCC compiler and tools to Windows, and is designed to be used in combination with a set of libraries and header files known as the Win32 API.
MinGW is not natively available on Ubuntu, as it is a Windows-specific development environment. However, you can use the mingw-w64 package in Ubuntu to build Windows applications on Ubuntu using the MinGW toolchain.
To install mingw-w64 on Ubuntu, you will need to use the apt-get utility, which is a command-line package manager for Debian-based systems, including Ubuntu.
Installing mingw-w64 in Ubuntu
To install mingw-w64 with apt-get, follow these steps:
1. Open a terminal window.
2. Update the package lists by running the following command:
$ sudo apt-get update
3. Install the mingw-w64 package by running the following command:
$ sudo apt-get install mingw-w64
Uninstall mingw-w64 from Ubuntu
You can uninstall mingw-w64 package from Ubuntu through the terminal:
$ sudo apt-get remove mingw-w64
Uninstall mingw-w64 including dependent package
If you would like to remove mingw-w64 and it’s dependent packages which are no longer needed, use the below command to remove the mingw-w64 package:
$ sudo apt-get remove --auto-remove mingw-w64
Use Purging mingw-w64
If you use with purge options to mingw-w64 package all the configuration and dependent packages will be removed.
$ sudo apt-get purge mingw-w64
If you use purge options along with auto remove, will be removed everything regarding the package, It’s really useful when you want to reinstall again.
$ sudo apt-get purge --auto-remove mingw-w64