"Tim Pease" <tim.pease / gmail.com> writes:

> On 8/8/07, unbewust <yvon.thoraval / gmail.com> wrote:
>>
>> i know RubyCocoa and use it i've even used ObjC in RubyCocoa but here
>> i need to write a C ext to ruby being, somehow a wrapper of an ObjC
>> API...
>>
>
> I think what brabhur was suggesting was to look at the RubyCocoa
> source code for some insight into how that project was able to call
> ObjC from a Ruby extension.

My solution for calling ObjC from Perl XS extensions was to tell GCC to
compile .c files (generated from .xs files and thus not easy to rename
to .m without patching the utility that generates them) as Objective-C.
The compiler flag for that is, surprisingly enough, -ObjC.

How to apply the -ObjC compiler flag when building Ruby extensions is a
question for someone with more Ruby expertise than me. Sorry!

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net