The following examples illustrate the use of SWIG with Ruby.
% swig -ruby interface.i
% swig -ruby interface.i % gcc -fpic -c interface_wrap.c -I/usr/local/lib/ruby/1.4/i686-linux % gcc -shared interface_wrap.o $(OBJS) -o interface.so % ruby require 'interface' Interface.blah(...) ...
require 'mkmf' create_makefile('interface')
% ruby extconf.rb % make