European Space Agency

European Space Agency

Royal Belgian Institute for Space Aeronomy

Royal Belgian Institute for Space Aeronomy

../_images/whiteSpace.png

T.01 - How to build the UNILIB library?

Answer

The UNILIB library is available in the form of Fortran sources which fully conform to FORTRAN 77 fixed-format standard, except for the use of FORTRAN 90 derived types. It is expected to compile using most FORTRAN compilers.

For reference, older versions of the library have been successfully compiled and linked using the following setups.

Linux (PC)

The object library has been built with the PGI Fortran compiler and the gfortran compiler. Assuming that the files libunilib.a and unilib.h are in the current directory, the user executable code can be produced by the command:

pgf77 myprog.f -L. -lunilib -o myprog.out

MS-DOS / MS-Windows

The object library has been built with gfortran. Assuming that the files unilib.lib and unilib.h are in the current directory, the user executable code can be produced by the command:

> DF MYPROG.F UNILIB.LIB

OpenVMS (FORTRAN)

The object libraries for VAX and AXP platforms are different. The object libraries have been built with the Digital Fortran 77 compiler: the VAX library (v2.01) on a VAX Station 4000 running VAX/VMS V6.1, and the AXP library (v2.01) on a Alpha Station 600 running OpenVMS v7.1. Assuming that the files unilib.olb and unilib.h are in the current directory, the user executable code can be produced by the command:

$ FOR MYPROG.FOR
$ LINK MYPROG.OBJ, UNILIB.OLB/LIB /EXE=MYPROG.EXE

OpenVMS (IDL) Before starting IDL, the user has to define a logical which includes the path to the shareable image. For further information see VMS-Specific Abilities / Calling a VAX FORTRAN Subroutine in Chapter 18 of the IDL user’s guide.

$ DEFINE unilib MY_DISK:[MY_DIRECTORY]UNILIB.EXE
$ IDL
Illustration

None

See also

UNILIB/trunk/