Mingw Online Tutorials

MinGW ("Minimalist GNU for Windows"), formerly mingw32, is a free and open source software development environment to create Microsoft Windows applications.

MinGW
Original author(s)Colin Peters
Developer(s)MinGW Project
Initial releaseJuly 1, 1998; 25 years ago (1998-07-01)
Stable release
GNU BinUtils—2.32-1, Installation Manager—0.6.3, WSL—5.4.2 / April 12, 2021; 2 years ago (2021-04-12)
Written inC, C++
Operating systemMicrosoft Windows, Unix-like (as a cross compiler)
TypeCompiler
LicensePublic domain (headers), GNU General Public License (compiler and toolchain)
Websiteosdn.net/projects/mingw

MinGW includes a port of the GNU Compiler Collection (GCC), GNU Binutils for Windows (assembler, linker, archive manager), a set of freely distributable Windows specific header files and static import libraries which enable the use of the Windows API, a Windows native build of the GNU Project's GNU Debugger, and miscellaneous utilities.

MinGW does not rely on third-party C runtime dynamic-link library (DLL) files, and because the runtime libraries are not distributed using the GNU General Public License (GPL), it is not necessary to distribute the source code with the programs produced, unless a GPL library is used elsewhere in the program.

MinGW can be run either on the native Microsoft Windows platform, cross-hosted on Linux (or other Unix), or "cross-native" on Cygwin. Although programs produced under MinGW are 32-bit executables, they can be used both in 32 and 64-bit versions of Windows.

The development of the MinGW project has been forked with the creation in 2005–2008 of an alternative project called Mingw-w64.

History edit

MinGW was originally called mingw32 ("Minimalist GNU for W32"), following the GNU convention whereby Windows is shortened as "W32". The numbers were dropped in order to avoid the implication that it would be limited to producing 32-bit binaries. Colin Peters authored the initial release in 1998, consisting only of a Cygwin port of GCC. Jan-Jaap van der Heijden created a Windows-native port of GCC and added binutils and make. Mumit Khan later took over development, adding more Windows-specific features to the package, including the Windows system headers by Anders Norlander. In 2000, the project was moved to SourceForge in order to solicit more assistance from the community and centralize its development.

MinGW was selected as Project of the Month at SourceForge for September 2005.

MSYS (a contraction of "Minimal System") was introduced as a Bourne shell command line interpreter system with the aim of better interoperability with native Windows software.

In 2018, following a disagreement with SourceForge about the administration of its mailing lists, MinGW migrated to OSDN.

Fork edit

In 2007, a fork of the original MinGW called Mingw-w64 appeared in order to provide support for 64 bits and new APIs. It has since then gained widespread use and distribution. MSYS2 ("minimal system 2") is a software distribution and a development platform for Microsoft Windows, based on Mingw-w64 and Cygwin, that helps to deploy code from the Unix world on Windows.[9]

Programming language support edit

Most languages supported by GCC are supported on the MinGW port as well. These include C, C++, Objective-C, Objective-C++, Fortran, and Ada. The GCC runtime libraries are used (libstdc++ for C++, libgfortran for Fortran, etc.).[citation needed]

MinGW links by default to the Windows OS component library MSVCRT, which is the C library that Visual C++ version 6.0 linked to (the initial target was CRTDLL), which was released in 1998 and therefore does not include support for C99 features, or even all of C89. While targeting MSVCRT yields programs that require no additional runtime redistributables to be installed, the lack of support for C99 has caused porting problems, particularly where printf-style conversion specifiers are concerned. These issues have been partially mitigated by the implementation of a C99 compatibility library, libmingwex, but the extensive work required is far from complete and may never be fully realized.[10] Mingw-w64 has resolved these issues, and provides fully POSIX compliant printf functionality.

Link compatibility edit

Binaries (executables or DLLs) generated with different C++ compilers (like MinGW and Visual Studio) are in general not link compatible. However, compiled C code is link compatible.[11]

Components edit

The MinGW project maintains and distributes a number of different core components and supplementary packages, including various ports of the GNU toolchain, such as GCC and binutils, translated into equivalent packages.[12][13] These utilities can be used from the Windows command line or integrated into an IDE. Packages may be installed using the command line via mingw-get.[14]

MinGW supports dynamic libraries named according to the <name>.lib and <name>.dll conventions, as well as static libraries following the lib<name>.a naming convention common on Unix and Unix-like systems.

In addition, a component of MinGW known as MSYS (minimal system) provides Windows ports of a lightweight Unix-like shell environment including rxvt and a selection of POSIX tools sufficient to enable autoconf scripts to run,[15] but it does not provide a C compiler or a case-sensitive file system.[16]

mingwPORTs are user contributed additions to the MinGW software collection. Rather than providing these "add-ons" as precompiled binary packages, they are supplied in the form of interactive Bourne shell scripts, which guide the end user through the process of automatically downloading and patching original source code, then building and installing it. Users who wish to build any application from a mingwPORT must first install both MinGW and MSYS.[17]

The implementation of Windows system headers and static import libraries are released under a permissive license,[18] while the GNU ports are provided under the GNU General Public License. Binary downloads of both the complete MSYS package and individual MinGW GNU utilities are available from the MinGW site.

Comparison with Cygwin edit

Although both Cygwin and MinGW can be used to port Unix software to Windows, they have different approaches:[19] Cygwin aims to provide a complete POSIX layer comprising a full implementation of all major Unix system calls and libraries. Compatibility is considered a higher priority than performance. On the other hand, MinGW's priorities are simplicity and performance. As such, it does not provide certain POSIX APIs which cannot easily be implemented using the Windows API, such as fork(), mmap() and ioctl().[19] Applications written using a cross-platform library that has itself been ported to MinGW, such as SDL, wxWidgets, Qt, or GTK, will usually compile as easily in MinGW as they would in Cygwin.

Windows programs written with Cygwin run on top of a copylefted compatibility DLL that must be distributed with the program, unless statically linked. If dynamically linked, the program must also provide information on where to obtain Cygwin source. MinGW does not require a compatibility layer, since MinGW-based programs are compiled with direct calls to Windows APIs.

The combination of MinGW and MSYS provides a small, self-contained environment that can be loaded onto removable media without leaving entries in the registry or files on the computer.

It is also possible to cross-compile Windows applications with MinGW-GCC under POSIX systems. This means that developers do not need a Windows installation with MSYS to compile software that will run on Windows with or without Cygwin.

See also edit

  • Cygwin
  • Windows Subsystem for Linux
  • Mingw-w64

Mingw Tutorials: MinGW (Minimalist GNU for Windows) is a native software port of the GNU Compiler Collection (GCC) and GNU Binutils for use in the development of native Microsoft Windows applications. Unlike Cygwin, it does not provide a POSIX runtime environment on MS-Windows.

Latest online Mingw Tutorials with example so this page for both freshers and experienced candidate who want to get job in Mingw company

Latest online Mingw Tutorials for both freshers and experienced

advertisements

View Tutorials on Mingw View all questions

Ask your interview questions on Mingw

Write Your comment or Questions if you want the answers on Mingw from Mingw Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---