Using C API in Lycia
The C API in Lycia allows a developer to call C functions in their 4GL
code. C code cannot be embedded in Lycia 4GL, to use it you must put it
into a dynamic C library and then link this library to your program. Calling
C functions from Lycia programs differs a bit from calling them using
earlier compiler versions.
To be able to use a C function, these requirements must be met:
- The
C source should contain a global variable usrcfuncs, declared using the
cfunc_t struct defined in fgifunc.h. This is used to declare which C functions
should be callable from the 4GL.
- All
C source must be compiled into a dynamic library and linked against lib4glc
in the Lycia distribution.
- The
ready C library should be linked to the 4GL program which uses the C functions.