Can I compile an arbitrary I4GL source file into a C-code object file and link this into a custom P-code runner (fglgo or fgldb)?
Empirical evidence shows that it nearly works, but there are usually linking problems caused by missing references, such as _efadsply(), _fardsply(), _efprmpt(), _efdsply() _efemsg(), _efmsg(), and _finput(). Additionally, even if you don’t run into these problems, it seems that embedded SQL’s do not work correctly when they are inside I4GL functions which are bound into the runners. Investigation of the source code shows that it is, in general, not advisable to try building I4GL C-code into the P-code runners. You can sometimes get away with linking some, typically simple, I4GL C-code functions into the P-code interpreter. These will typically be utility functions which neither access the database nor interact with the user. Note that it is easy to append the I4GL library functions (compiled with fglpc) to the interpretable (.4gi), so there is seldom a real need to embed I4GL code into the P-code runners.