To access GreG from your Fortran Program, you need to link to
First library : GAG_ROOT:[SHARED]GREGLIB/LIB Second library : GAG_ROOT:[SHARED]GAGSHARE/LIB
The access to these libraries is automatic on some machines. On other sites, issue the command $ SHOW LOGICAL LNK$LIB* to know if automatic linking is enabled. If not enabled, you may either make an explicit reference in the link as :
$ LINK PROG1,PROG2,...,- GAG_ROOT:[SHARED]GREGLIB/LIB,GAGSHARE/LIBor add the following assignments in your LOGIN.COM file for automatic linking to these libraries :
$ ASSIGN GAG_ROOT:[SHARED]GREGLIB.OLB LNK$LIBRARY $ ASSIGN GAG_ROOT:[SHARED]GAGSHARE.OLB LNK$LIBRARY_1
Note however that the GREGLIB library must be specified before the GAGSHARE library in the link command. Be careful if you have other shareable libraries in your link operation to have all these libraries placed as the last ones. As most of the code is shareable, linking to GreG is fast and does not produce a large code overhead. Also, you will get the minor updates of GreG automatically without need to relink your program.
However you may need to relink your program for major updates. In this case you will receive a message at run-time stating that the version number of the updated shared images (GREGSHR, CHARSHR, CONSHR, GTVSHR, IMASHR, GAGSHR or SICSHR) no longer matches the version number at link-time and you will not be able to run your program without relinking it. If this happens to you, please consult the latest description of the GreG manual to see whether any calling sequence might have been modified. If not, linking again will be sufficient.