From: has Date: 2008-03-23T05:45:01+09:00 Subject: Re: XCode, Mac OS X, Ruby C Extension On 22 Mar, 13:10, Wladjmir Wlj wrote: > Hi, > > i 've a problem trying to compile a simple C Extension, that actually do > nothing, only print an hello message. > If from XCode i create and build a new Ruby C Extension, then i try to > recall it from a ruby script, that use the ruby interpreter compiled > from MacPort , a BUS ERROR is returned, au contraire, if i use the I'd recommend using mkmf to build your extension as part of the installation process, rather than trying to build it yourself. That way your extension should work on any Ruby installation. I don't know what formal documentation there is for it; personally I just copied the extconf.rb script from another project (which copied it from another project...), so feel free to repeat the pattern if it helps. Obviously if you want to distribute a binary version of your extension for the convenience of your users (since not all OS X users have gcc installed by default), you'll need to create a separate distribution for each Ruby build you want to support. But hey, you can deal with that problem when you get to it. HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net