calling 4gl function from C pgm
Posted in 1995
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
I do not know how to call 4gl functions from C program. I wrote very simple pgm, but I still cannot run it on 4gl 4.20 WD1 and Microsoft C/C++ 7.00. I include all envriomenatl variables in autoexec.bat file and compile 4gl function into C code. The error I got is "fatal error U1077,'CL', return code '2' ". Can anybody tell me what bugs are in my programs and run the correct one on the similar system 4gl 4.20 for windows and Microsoft C/C++ version 7.00? ****************Beginning of C Pgm******************************* #include <fglapi.h> #include <stdio.h> main() { int c=5; fgl_start("my4gl.4gl",1); // I don't know how to supply last two arguments for fgl_start in // this program pushint(c); fgl_call(square,1); popint(c); fgl_end(); } *****************End of C Pgm ************************************* ****************Beginning of 4gl func****************************** FUNCTION square(c) define c smallint, a smallint let a=c*c display "the value of square is ",a at 4,15 return a END FUNCTION **************End of 4gl func***************************************