Jan Svitok wrote:
> You may also try SWIG, that will generate the extension for you from
> your header file (sometimes it needs little tweaking).
> 
> http://www.swig.org/

For an example of this, you can take a look at my id3lib-ruby project 
[1], where I use the id3lib C++ library from Ruby through bindings 
generated with SWIG. It was very easy to create the SWIG interface file 
and it works perfectly.

[1] http://rubyforge.org/projects/id3lib-ruby