From: ara.t.howard@... Date: 2006-08-05T04:16:19+09:00 Subject: Re: Include existing C/C++ libraries in Ruby. On Sat, 5 Aug 2006, Ritesh Tijoriwala wrote: > I want to use my existing C/C++ libraries in Ruby and is there a way to > do that? I tried SWIG but it doesn't work out that good for complex > objects and methods that I have in my libraries. Any other ways to > accomplish this? you can use them directly with ruby/dl harp:~/build/ruby-1.8.4/ext/dl/sample > cat a.rb require "dl/import" require "dl/struct" module LIBC extend DL::Importable begin dlload "libc.so.6" rescue dlload "libc.so.5" end extern "int atoi(char*)" end p LIBC.atoi("42") harp:~/build/ruby-1.8.4/ext/dl/sample > ruby a.rb 42 dl is included with ruby -a -- happiness is not something ready-made. it comes from your own actions. - h.h. the 14th dali lama