Still think gcccrab is overkill (or perhaps underkill and it should become a facility that things like brexx could use). It allows user process specific variables when using a? shared libres library. Otherwise all programs using the library would share the same global variable. If that makes any sense.
(Presumably brexx having shared variables would be a good thing to allow a program like execio to update rexx variables ... but anyway!)
The debugging issue is without printf working I can't be sure if the call to a resident function is not working, or just the gcccrab bit meaning stdout is busted.