This document describes how to install TFEL/MFront on Windows plateform using MingGW and cmake.

The main difficulty associated with building TFEL/MFront on Windows plateform is the lack of an unified build environment which must be set up by the user. We suppose that you want to build TFEL/MFront on top of the Cast3M finite element solver which comes with its own software environment based on MinGW.

Installing the mandatory prerequisites

Installing MSYS

MSYS is a collection of GNU utilities, in particular make which is used by MFront. It also provides a convenient shell which is far more easier to use than the DOS terminal provided by the cmd command.

We will use the mingw-get-setup.exe program that can be grabbed here.

Installing MSYS is a \(3\) steps process depicted on the following figures~:

Splash Screen (Click on Continue)

Splash Screen (Click on Continue)

This first step allows you to choose the installation directory of MSYS. The default installation path is C:\MinGW.

Downloading the latest list of packages

Downloading the latest list of packages

The second windows appears while mingw-get-setup.exe downloads the latest list of packages. Just click on Continue once finished.

Selecting the components to be installed (Select msys-base)

Selecting the components to be installed (Select msys-base)

The third windows allows you to select the components to be installed. The only one required for MFront is the msys-base package.

Once the components are selected, choose Apply Changes in the Installation menu and click on OK to launch the components installation.

User directory location

Once done, the msys.bat script launches a shell which is very similar to standard UNiX shells.

Assuming that MSYS has been installed in C:\MinGW, the user directory is located here:

C:\MinGW\msys\1.0\home\[user name]

This allows easy exchange of file between the Windows world and theMSYS one.

Inside MSYS, one can access most Windows files through the /c/ path:

$ ls /c/
MinGW Program Files users windows

Installing cmake

The cmake project provides a graphical installer on its website.

Installing NSIS

At the end of the compilation process, we will create a graphical installer based on NSIS which can be grabbed here.

Compiling TFEL

Compiling TFEL is merely a simple as opening a new MSYS session and following the instructions given on the main installation page.

The main differences are that one must:

$ export PATH=/c/Cast3M/PCW_14/MinGW/x32-4.6.3-posix-dwarf-rev2/mingw/bin/:$PATH
$ cmake -G "MSYS Makefiles" [path to TFEL sources] [options]
$ make
$ cpack -G "NSIS"


An executable called tfel-.. has been build and can be executed to install TFEL.

This executable is a standard graphical installer which allows you to choose which components of TFEL you wish to install:

The installer also allows you to choose where TFEL shall be installed: TFEL must be installed in a path without blanks, for example in the directory C:TFEL.

We strongly advice the user to create or modify its .profile file in its home directory in the MSYS environment to get the MinGW compilers provided by Cast3M in the path by appending the following lines:

export PATH=/c/Cast3M/PCW_14/MinGW/x32-4.6.3-posix-dwarf-rev2/mingw/bin/:$PATH
export PATH:/c/Cast3M/PCW_14/bin/:$PATH
alias castem='cmd //c castem14.bat'

Assuming a standard MSYS environment, the file is located here:

C:\MinGW\msys\1.0\home\[user name]\.profile


Once done, mfront can be used as "usual" (like in Posix environments) in MSYS.