.so file
- From: Alain Reymond <arwebmail@xxxxxxxxx>
- Date: Mon, 02 Jan 2012 16:46:27 +0100
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
.
- Follow-Ups:
- Re: .so file
- From: Brian Tiffin
- Re: .so file
- Prev by Date: Re: "Abuse" of COBOL?
- Next by Date: Re: "Abuse" of COBOL?
- Previous by thread: "Abuse" of COBOL?
- Next by thread: Re: .so file
- Index(es):
Relevant Pages
|