Table of Contents

How to install MinGW and an example of Fortran compilation using MinGW

1. Description

MinGW means Minimalist GNU for Windows. It is a minimalist development environment for native Microsoft Windows applications (see https://www.mingw.org/).

MinGW is used in Capsis to generate executables from Fortran, C, C++, … source files to be run on Windows operating systems. These executables are used in some Capsis modules. It is for example the case with the genotype_generator.f90 Fortran source file which corresponding executable is called by the Luberon2 module.

2. Installation

2.1. Installation of MinGW

MinGW can be installed by using the following steps:

Remark: if some dll files are not found during packages download process, they can be found here : https://sourceforge.net/projects/mingw/files/OldFiles/ contained in .tar.xz files that can be uncompressed. The missing dll files have to be copied in the bin sub directory of the installed MinGW directory.

2.2. Configuration of the Path environment variable

In order the system knows where to find the executables contained in the installed MinGW directory, you have to modify the Path system environment variable. To do that (example on Windows 7):

3. Example of Fortran compilation

Instructions for compiling the genotype_generator.f90 source file (Fortran 90 code called from Luberon2 module) using the gfortran executable stored in the bin sub directory from the MinGW installed directory (example: C:\MinGW\bin) are: