HP C Programmer's Guide (92434-90009)

Chapter 3 57
Calling Other Languages
Comparing HP C and HP FORTRAN 77
chapter.
Passing string variables of any length must be done by: building and passing a
two-parameter descriptor (defined in Note 3 above), initializing the string appropriately,
and by passing two arguments. The two arguments are the pointer to the characters and
the value of the length word. This is shown below:
char *chars = "Big Mitt";
int len;
len = strlen(chars);
pass_c_string (chars, len);
Linking HP FORTRAN 77 Routines on HP-UX
When calling HP FORTRAN 77 routines on an HP-UX system, you have to include the HP
FORTRAN 77 run-time libraries by adding the option:
-lcl
to the cc command line.
For details on linking external libraries, see the -l option of the cc(1) and ld(1)
commands in the HP-UX Reference manual.