.so file



Hello,

Here is a little problem :

Let's say I have a c file cprog.c with :
---- begin cprog.c
cfunc1 (st, c)
char *st;
int *c;
{
....
return(0);
}

cfunc2 (st, c)
char *st;
int *c;
{
....
return(0);
}
---- end cprog.c

How to create an .so from the c file under unix to be able to call the
functions from a Cobol file under Micro Focus cobol :

---- cblprog.cbl ----
working-storage section.
01 str.
03 str-text pic x(10).
03 filler pic x value x"00". *>Null terminate string
for C function
01 counter pic 9(8) comp-5 value zero.

procedure division.
call "cfunc1" using str, counter
call "cfunc2" using str, counter
if return-code not = zero
display "ERROR"
else
display "OK"
end-if
stop run.


Best regards and happy new year!

Alain

.



Relevant Pages