This use to work on UNIX for me:
define new shared variable c# as int.
c# = 1.
procedure wubble external "/tmp/a.so" CDECL :
define input parameter X as LONG.
define return parameter Y as LONG.
end.
def var a as int initial 5.
def var b as int.
run wubble (input a, output b).
display a b c#.