[Prev][Next][Index][Thread]

Re: Shared libraries and ObjC on MacOS X



In article <200105081006.GAA17200@life.ai.mit.edu>, Rob Myers 
<robmyers@mac.com> wrote:

> On Tuesday, May 8, 2001, at 02:15  am, Brian Campbell wrote:
> 
> > Is there a way to create and load shared libraries using d2c on MacOS 
> > X? If
> > so, how?
> 
> You can link shared libraries in to d2c-generated code at link time, or 
> it should be relatively simple to wrap CFBundle to get symbols 
> dynamically. I don't know how you'd get them into the Dylan runtime, 
> though. It shouldn't be too astoundingly hard using <dynamic-method>s 
> and add-method on an open generic.
> 
> Shared libraries seem to be broken for d2c on MacOS X at the moment, 
> though: GNU autoconf / GNU libtool doesn't recognize that MACH can 
> handle shared libraries. :-( Maybe Gareth's fix for using glibtool will 
> help fix this.
> 
> > Also, is there any actuall working code for the ObjC interface people 
> > have
> > been talking about, and if so, where can I find it?
> 
> I've written a lot of code for this in Dylan of all things (my Perl 
> manuals were in a box under and behind many other boxes), I was 3/4 done 
> when I switched to working on the d2c c-ffi implementation. I'm getting 
> lots of good experience doing this, so I'll probably re-implement the 
> system as an objc-ffi in a few months time.
> 
> There's example code for calling an objc method from Dylan on the 
> archives for this list, if google have got the deja databases back up.

I was also working on an Objective-C interface. It isn't hard to do, but 
I needed a C ffi implementation, and I don't think there is one for GD 
yet. When that gets released, I'll continue with the project.



Follow-Ups: