Previous: Static COBOL to C, Up: C Interface
You can create a dynamic-linking module from a C program by passing an option -shared to the C compiler:
-shared
$ cc -shared -o say.so say.c $ cobc -x hello.cob $ export COB_LIBRARY_PATH=. $ ./hello Hello World!