From: Steven Jenkins Date: 2005-03-26T06:49:46+09:00 Subject: Re: SWIG-ruby problem with FMOD David Plans Casal wrote: > Hello everybody, > > I'm just trying to use SWIG to create some Ruby bindings for FMOD > (http://www.fmod.org/) > > Using the simplest example from the examples that ship with the FMOD > mac api, where there is a main.c file that simply plays a sound file... > > I tried the following: > > swig -ruby main.i SWIG doesn't know what to do with main(). It only wants to see the function prototypes in the library header files. You'll have to write your own main() equivalent in Ruby. SWIG is cool, but it's not simple. If you're new to it, I'd suggest doing a couple of really simple examples first. Get a wrapper working for -- begin sum.h int sum(int a, int b); -- end sum.h -- begin sum.c int sum(int a, int b) { return a + b; } -- end sum.c and you'll be on your way. Steve