I’m trying to create a ruby extension with a library that uses boost.
This little example
extern “C” void Init_bayeux()
results in a std::bad_cast exception being thrown, when loaded into the
ruby interpreter. I used the mac port installation of the gcc to build
the extension and installed ruby via rvm.
ruby 1.9.2p320 (2012-04-20 revision 35421) [x86_64-darwin10.8.0]
Using built-in specs.
Configured with: …/gcc-4.5.2/configure --prefix=/opt/local
–with-system-zlib --disable-nls --program-suffix=-mp-4.5
–with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local
Thread model: posix
gcc version 4.5.2 (GCC)
I elaborated already on the issue (see
for details) but found no way to build a shared library, that links to
boost and can be successfully loaded by the ruby interpreter.
Is there someone out who was able to build a ruby extension, that uses
boost? Any help and pointers are highly appreciated.