Tech Tip: Calling the Mark 21 DLLs from g77 and gcc

When we issued the Mark 21 DLLs, the Users' Note contained important information on the use of this library from a variety of different environments. We assumed that the advice given at Mark 20 for using the DLLs from g77 and gcc would no longer be required because users would have changed compilers.

Nevertheless Mark 21 may be called from g77 and gcc, so the advice given at Mark 20 merely needs to be revised slightly:

The command for calling the Mark 21 DLLs from g77 is:
g77 -fno-underscoring -fcase-upper -mrtd driver.for FLDLL214Z_nag.lib
or
g77 -fno-underscoring -fcase-upper -mrtd driver.for FLDLL214Z_mkl.lib

Character strings arguments demand special attention. Immediately after the character string argument, pass by value the length of the string. For example :
DEV = G01FAF(TAIL,%VAL(1),P,IFAIL)

In the example program D02CJFE.F, you need to replace the formal argument RELABS (actual argument ‘Default’) in all the calls to the routine D02CJF by:
‘Default’,%VAL(7)

If the argument is a character array, pass the length of each array element. This information is valid for both Cygwin and Mingw versions.

Calling the library from gcc is even simpler, provided you have read the advice in the ‘headers’ subdirectory and used the header files provided with the DLLs.

Simply type:
gcc driver.c FLDLL214Z_nag.lib
or
gcc driver.c FLDLL214Z_mkl.lib

For specific technical advice in using NAG's products, please contact our technical experts.

Return to Technical Tips & Hints index page.

Website Feedback

(If you're a human, don't change the following field)
Your first name.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.