I think this last problem is due to the low level binding which requires an exact compatibility match for all parameters.
When library functions are bound this way (without prototype declaration) then O2 strings should be passed as *S instead of S, because they are double pointered.
Charles