For calibration of material parameters, it is useful to use a single element test driver for umat by A. Niemunis. Compilation has been tested with an open source GNU GCC compiler in Linux. The following guide should however be applicable also to GCC compiler under Cygwin distribution in Windows operating system.
As the driver and umat are in different programming languages (FORTRAN and C++ respectively), they should be compiled separatelly and then linked together to create the driver executable. To do so, proceed as follows:
gcc -c umat_vec.cpp
gfortran -c usolve.f
gfortran -c incrementalDriver.f
Note that usolve.f has to be compiled first, as unsymmetric_module.mod needed by incrementalDriver.f is created by compilation of usolve.f
gfortran -o incrementalDriver incrementalDriver.o usolve.o -lstdc++ umat_vec.o
Note that the gcc option -lstdc++ is crucial for linking, as otherwise C++ libraries needed by the C++ umat are not loaded by gfortran.