[MacRuby-devel] Objective-C SDL bindings accessible from Ruby?

Laurent Sansonetti lsansonetti at apple.com
Wed Sep 30 17:49:28 PDT 2009


It's not going to work as easily. Bridging C APis to MacRuby involve  
the creation of a BridgeSupport project which is not trivial. We are  
working on a new version of the BridgeSupport generator which should  
be all automatic, but it's still under development.

I would recommend wrapping your SDL calls into an Objective-C class  
then use it from MacRuby. Or use a core system API like CoreGraphics :)

Laurent

On Sep 30, 2009, at 2:10 PM, Timothy McDowell wrote:

> I was thinking of just using the C (C++? I'm not sure) prebuilt SDL  
> frameworks I have on this computer... I know the Objective-C side  
> can handle all of it fine, but can the ruby?
>
> On Wed, Sep 30, 2009 at 2:18 PM, Laurent Sansonetti <lsansonetti at apple.com 
> > wrote:
> On Sep 30, 2009, at 11:07 AM, Timothy McDowell wrote:
>
> I'm fairly new to objective-c, xcode, and the whole compiling/ 
> linking process altogether. But I was wondering if I link my SDL  
> library to my xcode macruby project, can I access the SDL from both  
> the Obj-C side and Ruby?
>
> Yep :) Pure Objective-C APIs should be callable from MacRuby  
> automagically.
>
> A side note, if your Objective-C SDL bindings framework exposes C  
> APIs or C-based symbols, you may want to generate a BridgeSupport  
> file for it, because MacRuby has no way to know that. The  
> gen_bridge_metadata(1) man page has information.
>
> Good luck,
>
> Laurent
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
>
> -- 
> --Brains.
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel



More information about the MacRuby-devel mailing list