Unfortunately you can't use dynamic linking with Lua and FPC. I don't know why, all I know is that it blows chunks if you try to.

Granted I haven't tried dynamic linking with 5.1

Since it looks like the changes to lua.pas and luautils.pas are minimal, I'll add them in and send it over to the FPCTut guys to have it all brought in.

The 3rd demo crashing doesn't surprise me . It does that on windows as well (still trying to figure out why, but I think I got it when I fixed the oo demo).

Thanks for giving a try,