Enter the top-level s48-stubber directory, or adjust all of the pathnames manually. In Scheme48: > ,config ,load scheme/interfaces.scm scheme/packages.scm > ,open usual-stubber > (usual-stub-file 'socket "examples/socket.stub" "examples/socket.c" "examples/socket.scm") In a shell (or just invoked through Scheme48's POSIX interface): % gcc -g -Wall -I./c -c c/s48-stubber.c -o c/s48-stubber.o % gcc -g -Wall -I./c -c examples/socket.c -o examples/socket.o The next line varies from operating system to operating system; the intent is to build a dynamically loadable object from the relocatable objects `c/s48-stubber.o' and `examples/socket.o'. The following works on OS X: % gcc -g -Wall -dynamiclib -flat_namespace -undefined suppress \ c/s48-stubber.o examples/socket.o \ -o examples/socket.dylib Back in Scheme48: > ,open load-dynamic-externals external-calls finite-types > ,open signals byte-vectors channels architecture ;; #F -> do not add a `.so' suffix ;; #T -> reload if second time ;; #T -> reload on image resumption > (load-dynamic-externals "examples/socket.dylib" #f #t #t) > ,load examples/socket.scm > (define socket-channel (%create-socket (socket-domain INTERNET) (socket-type STREAM) 0 ;Default protocol (enum channel-status-option INPUT) "socket input")) > socket-channel #{Input-channel "socket input"} > (channel-os-index socket-channel) ...