From: pere.noel@... (=?ISO-8859-1?Q?Une_b=E9vue?=) Date: 2006-08-08T03:40:12+09:00 Subject: Re: writing native ObjC extension to ruby ?? Logan Capaldo wrote: > > Are you using mkmf? It'll make your life much easier and produce the > right compile switches. not before, but right now, i'm following the page "How to create a Ruby extension in C in under 5 minutes" i've allready done the "MyTest" example and want to adapt this strategy to the jukebox given in "Extending Ruby" of "The Pragmatic Programmer's Guide" . here i've done the "cdjukebox.bundle" using mkmf however when wanting to test by ruby i get : dyld: NSLinkModule() error dyld: Symbol not found: _CDPlayerSeek Referenced from: ./Jukebox/cdjukebox.bundle Expected in: flat namespace the *.h and *.c are cut'n paste from pickaxe and my ruby test being : require 'Jukebox/cdjukebox' p = CDPlayer.new(1) puts "Unit is #{p.unit}" p.seek(3, 16) {|x| puts "#{x}% done" } puts "Avg. time was #{p.seekTime} seconds" also as it's done in pickaxe... i wonder also how to translate my ObjC class into a C one, i've heard they are tools for that ? (i've found the reverse C -> ObjC) -- une b�vue