PTC MKS Toolkit Menu

Tech Note: FORTRAN Compiler Support with MKS Toolkit Migration Products

The History of HP FORTRAN
The HP FORTRAN compiler originated with Microsoft and was the first and only FORTRAN compiler supported by NuTCRACKER 1.x. Unfortunately when the compiler was sold to DEC (at the time, who was acquired by Compaq and eventually merged with HP) the runtime library was rewritten to native Win32 from stdio and since the old runtime library sources were unavailable and the new ones were not compatible with stdio in any way it became necessary to support a new compiler. The Absoft FORTRAN compiler was chosen as it was a robust, conforming, performing, market leader and had a UNIX runtime library for use with the NuTCRACKER Platform.

In the past, MKS Toolkit support has taken a very hard line about FORTRAN support in the NuTCRACKER Platform. It remains true that the only fully supported solution (with integrated runtime library support) is to use the Absoft FORTRAN compiler; however there are two situations where other compilers may solve your particular needs:

  1. In the case that you have the UNIX sources of the FORTRAN runtime library for the FORTRAN compiler of your choice, it is reasonable to build those against the NuTCRACKER Platform headers and libraries. It is very likely that the result will work entirely as expected. An example of this is presumed to be GNU FORTRAN where there is a Win32 port of the FORTRAN compiler and the UNIX runtime library sources are freely available — and since MKS Toolkit v8.7 (and above) fully supports GNU C/C++ development it is highly likely that FORTRAN could be made to work with little effort.

  2. In the case that you have no interest in integrated runtime library support (i.e. where your FORTRAN code is arithmetic subroutines that do not perform IO or the IO that they do is totally independent from any C code and does not need to share file descriptors) it may be reasonable to build a stand-alone Win32 DLL from the FORTRAN code and call it like any other native Win32 code would be called. Please see the UNIX to Windows Porting Guide for more details about integrating Windows code with UNIX ported code.

It is still recommended that you use the Absoft FORTRAN compiler as this will give you the greatest compatibility with your existing build environment and source code, but the above options might help you to use the HP FORTRAN compiler or gf77 under some limited conditions.