Book Image

Instant MinGW Starter

By : Ilya Shpigor
Book Image

Instant MinGW Starter

By: Ilya Shpigor

Overview of this book

If you need stable, dynamically developed, and easy-to-configure instrumentation for application development, look no further than MinGW. It supplies all the dynamic tools you need to enable you to develop Microsoft Windows applications, while allowing for easy integration with the software that you already use. This book will give you the expert guidance you will need to start developing applications with Instant MinGW. As well as help you to become an experienced user of MinGW, the book will also detail some of the more common pitfalls that beginners face when first using the software, and more importantly, how to avoid them yourself. This book will help  you through the installation process, and help introduce you to compilation, debugging, and profiling with MinGW. It will guide you in importing existing projects developed with Visual C++ Integrated Development Environment to MinGW, and show you how to start using it to develop your current projects with minimal effort.This book will also introduce you to developing applications with several well-known, open source, GUI libraries and the MinGW software.With Instant MinGW Starter, you will gain a reliable, comprehensive, and supremely beneficial introduction to the MinGW software, and quickly learn how to use it for new, and old, projects.  
Table of Contents (8 chapters)

So, what is MinGW?


Minimalist GNU for Windows (MinGW) is a native software port of the GNU tool chain for the Microsoft Windows operating system. The base components of MinGW software are compiler, linker, and assembler. This minimal tool set is enough to start developing applications. But MinGW contains some service utilities to make the developing process more effective:

  • GNU Make

  • GNU Debugger (GDB)

  • GNU profiler

  • Compiler for Windows resource files

  • Header files and libraries for Windows API

  • Collection of archives and packers

These components allow you to develop native 32-bit Windows applications without any proprietary third-party software. All components of MinGW software are produced under GNU General Public License and therefore this is a free software that you can download, use, and change as you want.

You can develop applications in C, C++, Java, Objective C, Fortran, and Ada programming languages with MinGW software. C++ application development will be described in this book, which is more typical for MinGW usage.

Besides developing new applications, you can import existing Visual C++ projects to MinGW software. It is easy to integrate MinGW with well-known third-party libraries such as DirectX, Boost, Qt, GTK, OpenGL, and SDL. If you are using any of these libraries, you can compile your application with MinGW.

MinGW software is very useful for importing Unix and Mac applications to Windows native code. It provides the same instruments that Unix and Mac developers have used in most cases. Also, you can import your MinGW-based applications to any computing platform supported by the GNU toolchain. Therefore, MinGW software is a great instruments' set for developing cross-platform applications.

Another benefit of MinGW software is modular organization. You can replace most components of the GNU toolchain with your favorite instruments (for example, debugger, profiler, or build automation system). These instruments will be integrated with existing components without any problems. Usage of the MinGW software is the first step to collecting your own developer's instruments' set for comfortable work.

The compiler efficiency is one of most important parameters for software developers. There are a lot of C++ compilers' benchmarks that are available on the Internet. Unfortunately for us, developers of proprietary compilers are not interested in objective researches of this kind. Fair comparison of available compilers is impossible because of this.

The MinGW compiler efficiency is abreast to proprietary compiler efficiency today according to benchmarks of independent software developers. You can find one of them at the following website:

http://www.willus.com/ccomp_benchmark.shtml?p9+s6

The MinGW software releases are more frequent than the proprietary compilers' releases. This means that MinGW is developed and improved more dynamically. For example, the standard features of C++11 have been supported by the GCC compiler earlier than the Visual Studio one. You can find these features at the following website:

http://wiki.apache.org/stdcxx/C++0xCompilerSupport

Notice that the GNU toolchain is a product of Unix culture. This culture is earlier than GUI applications with access to any function through menus, dialogs, and icons. Unix software has been developed as a suite of little stand alone utilities. Each of these performs only one task, but this execution is optimized very well. Therefore, all these utilities have a text-based interface. This provides the simplest intercommunication mechanism with a command line shell and saves the system resources.

If the idea of a text-based interface scares you, be relieved because there are a lot of Integrated Development Environments (IDE) that support MinGW.