2

OpenCOBOL uses intermediate C source on the way to compiled binary, giving it access to the entire libc universe. With a goal of centralized embedding of more than one SWIG wrapper:

cobc -C nextbig.cob
swig -java nextbig.i
gcc nextbig.c nextbig_wrapper.c
gcc -shared ... 

and gcc builds a very nice binary, Java and the C output of the COBOL compiler mixed nicely.

Only tested swig -tcl, -perl, -python and -java so far (all different nextbig_wrapper.c of course).

How much grief would be involved in blending (for instance) swig -java and swig -python across the same nextbig.c and nextbig.i? Is there a known idiom for manual intervention at managing two or more target _wrapper.c files? Or is it a known thing not to do?

Cactus
  • 27,075
  • 9
  • 69
  • 149
Brian Tiffin
  • 3,978
  • 1
  • 24
  • 34

0 Answers0