[MacRuby-devel] loading a non-objc bundle

Joel Reymont joelr1 at gmail.com
Fri Jan 14 12:37:34 PST 2011


This is what I did to make it work...

file beagle.so
beagle.so: Mach-O 64-bit bundle x86_64

Note that beagle.so is a bundle so I can't link against it. 

beagle.c is a file that loads the bundle and sets up function pointers to call into it.

--- BeagleBundle.c ---
#include "beagle.h"

void Init_Beagle(void) { }
----

gcc BeagleBundle.c beagle.c -bundle -o Beagle.bundle

irb(main):002:0> require 'Beagle'
=> true
irb(main):003:0> load_bridge_support_file 'beagle.bridgesupport'
=> main

Voila!

---
http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont







More information about the MacRuby-devel mailing list