I haven't tried this myself, but have you looked at ruby's dl package? 
This may save you from having to deal with g++ and linking all 
together.

http://raa.ruby-lang.org/project/ruby-dl/

There's not home page mentioned, but a quick search turned up

http://ttsky.net/ruby/ruby-dl.html

hope this helps.

J.

On 08/09/2004, at 9:30 AM, Dominik Werder wrote:

> Hello everybody,
>
> I'd like to use some encryption functions from the crypto++ library
>  from within ruby.
>  To achieve this, I tried to make C-Wrapper functions around the C++
>  library archive.
>  But to link it against the C++ Archive, I have to use the g++
>  compiler, otherwise the linker doesn't find symbols (any workaround
>  for this?!?)
>  The bad thing is that g++ doesn't compile the ruby extension properly.
>  I'm very new to C++, so I've no idea how to solve this.
>  Does anybody know of a ruby extension that wraps C++ libs where I can
>  spoof a little bit?
>
> bye!
>  Dominik