Well, mostly because it gets converted to C very, very poorly.
For example, insterad of passing arguments to functions directly, it passes the # of arguments, and then you have to use special functions to read/write to the stack. Then do the reverse upon leaving the function (write the return var to the stack, then actually return the # of values you put on the stack).
So, when I write a C function to load and then run my library, the function has to catch the # of vars I'm passing it (usually fixed), then throw it back on the stack, send the 4GL function (which, now, has been converted to C) the number of vars (again, fixed), and then put the actual value on the stack, then call the C function converted from the 4GL (which undoes what I just did which undid what the function that started it all out did).

PITA, really.

Now, when I ran it, it actually ran successfully, to a point. It called my lib_archive() function, but the lib_archive() function seemed to ignore all 'call ...' statements in it. So it just exited back with a null (which then completely effed' up my reading and modding the stak before returning to the main function, causing a segfault.)
I'm not too sure why the lib_archive() in the *so file didn't call any of it's functions.. On the other hand, I was pleasently suprised that once I found linking info online, I was able to actually get the program to run, load the library, and actually fire off the function within.. 10 minutes of starting on it.

(Oh, and also take into account that I 'stretch' the limits of the 4GL and what it 'expects' with it's stacks and all.. 1. I nosed around and changed some of the 4gl's converted functions into pure C functions (stack-less? I guess you'd call it) and use those instead. 2. I bypass some of the 4GL's SQL interface, and us the C interface, giving me more flexibility and speed. 3. I use fork()'s in my C code to run external commands, and catch the output and result. 4GL was never meant to 'fork' into other processes, and I've been able to make it work. Add all thse together, and my program ended up being too fast for it's own good, and had to sleep() it to slow it down.) The only reason I stay with the 4gl at all is that it gives me a very convienent user interface, and certain SQL functions.

When I say I do 'Mad Science Programming', I mean it. Muahaha. I seem to highly excell at taking existing code, and mutilating it in the worst way to get it to work the way I want (faster, easier, etc etc).

*erm* Sorry for the dissertation.
Me.
_________________________
Mike 'Fox' Morrey 128BPM@124MPH. Love it! 2002 BRG Mini Cooper