The use of Python ctypes to call COBOL
error undefined symbol _mFsoload
This simple example demonstrates how well Visual COBOL can integrate with PYTHON.
It covers the core subjects of COBOL and C build, BASIC PYTHON scripting and execution.
Here is the output
At the end of the output it shows Python calls, C then C calls COBOL, returning back to PYTHON.
The doit.sh script below shows displays from PYTHON, C and COBOL.
Here is the doit.sh
Create a tmp directory as in ouput above,
Enter the doit.sh code into a doit.sh script in the tmp directory,
Change the cobsetenv comand to point at your COBDIR and,
Execute the doit.sh to get it to work.
The key is the LD_PRELOAD for a simple c calling COBOL library