Welcome to TheCredence.com - You may like to subscribe to our RSS feed to stay updated.

Normally, programming tools for Windows, such as Visual C++, Delphi, and others, are quite expensive. In addition, Windows lacks a standard build environment such as Unix and Linux. However, these problems are easily solved with MinGW and Msys. MinGW is simply a collection of GNU tools ported to Windows, a fully compliant C and C++ compiler, runtime files, and more. Msys is a tool to simulate a Linux-like programing environment, using standard Linux paths
such as /usr/local/include and /usr/local/lib. In this way, a standard build environment can be created even on Windows. MinGW does not provide any IDE or other such interface, but some can be downloaded freely if desired.

Getting the files
The easiest way to get the needed files is to download a small installer that will download the rest of the files for you. The main MinGW web site (http://www.mingw.org) has such an installer. Under the download section, look for a file called something like MinGW-5.1.3.exe and download it. Once downloaded, run it. Eventually, a screen will appear allowing the selection of any additional components to be downloaded.

mingwinst.jpg

MinGW only provides the compiler and tools, but not the Linux-like environment. For that Msys is needed. It can be downloaded from the same site. After installing both MinGW and Msys, it is possible to develop using a Linux-like
environment from the Msys shell.

Using the environment
Usually when programming for Windows, a project that depends on other libraries will need to set up the include and library paths to the dependencies. With Msys, most of the include and library files are already installed to a standard
place, and so no special paths need to be set up. The shell can be launched by clicking the Msys icon.

msysshell.jpg

This environment provides many of the tools needed to build software, including a shell that is compatible with most configure scripts.

Installing other libraries
Once the environment is set up, other libraries can be installed. Compiling the libraries from source is quite simple. The typical steps involve 'configure' to configure the package and create the makefiles, and then 'make' and 'make install'
to compile the library and install it to /usr/local/include and /usr/local/lib. In order for the compilers to use these paths, edit /etc/profile and add the following lines:

export CPATH=/usr/local/include
export LIBRARY_PATH=/usr/local/lib

These lines tell the compiler to use extra paths for the includes path and library path. Without them, only the default /mingw/include and /mingw/lib paths will be used.

Setting up a completely free programming environment on Windows is fairly simple. In addition, this programming environment provides a standard directory structure. Because of this, a program usually does not need to set up fancy include and library search paths for each external library the program uses. Instead, the headers and libraries are usually located in the standard /usr/local/include and /usr/local/lib directories. Some libraries may have a more advanced layout,
but usually provide a simple X-config script, such as sdl-config or wx-config, that can be used to determine the paths and libraries to link with. Do tell me what you think of MinGW :)

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Subscribe in a reader |

Links you may find interesting -