I see in the ACUCOBOL-GT docs that it is possible to call C/C functions from COBOL using the CALL statement.
In Windows, I've managed to do this using pure C code that was compiled with gcc. This was done using the version of gcc that ships with MinGW in release 5.1.1 of the Qt framework.
If I try to call functions in a DLL that was compiled with g or cl.exe (the Visual C compiler), I keep hitting the ON EXCEPTION part of my CALL statement. Obviously I'm missing something.
I'm aware of the name-mangling issue with C compilers, and have tried to work around it by using __declspec(dllimport) and __cdecl in the C function declarations. However, this does not resolve the problem.
Can anyone provide a simple example of both C code and compile/link commands, which would allow C library code to be used from ACUCOBOL? And can this only be done using COM DLLs? (That's the one thing I haven't tried, because I don't have a development environment that supports creating COM DLLs.)
I'm interested in doing this both in Windows and Linux, with the current release of ACUCOBOL-GT.
Thank you in advance for any assistance!
#c
#C
#Linux
#Windows
#Interoperating



