Frank Heckenbach wrote:
Please look at gpc-in-c.h, as there may be more things you'll have to do. (You can ignore the part about `--gpc-main' if you only have units on the Pascal side.)
Okay, thanks. Calling _p_initialize solves the problem, of course. However, since it wasn't necessary in an earlier version, I wonder what has changed since?
Pure Pascal projects are not affected, there the RuntimeError just works fine.
More precisely, if the main program is in Pascal, things are initialized/finalized automatically. So unless the C part insists on providing main(), you might consider this alternative. (You can then, of course, call a big C function which does most of the work from the Pascal main program, and the C functions can then call back to Pascal anytime.)
Problem is, what I'm writing here is a library, so most probably there will be some users who insist on running it from a C main(). However, I could just provide all of my C demo programs with init()- and fini()-calls at the beginning and the end; that should be clear enough.