Thread overview
Docoa
Apr 01, 2004
resistor
Apr 01, 2004
Ben Hinkle
Apr 01, 2004
resistor
April 01, 2004
I just successfully bridged D -> Cocoa on Mac OS X.  It was slightly
complicated, but it works.  I wrote a
D module that at the moment does nothing more than expose the NSApplicationMain
function to D, as
well as a main module that called it.  I then compiled but did not link both
modules with GDC.  Then I
used Apple's GCC to link .o files with the Apple Cocoa framework and the static
libraries from GDC.
And now when I run it it launches successfully and opens a window!!  Yay!

Owen


April 01, 2004
Excellent! It would be great to get Mac support on the various
GUI toolkits floating around. :-)
Good luck
-Ben

On Thu, 1 Apr 2004 02:15:07 +0000 (UTC), resistor@mac.com wrote:

>I just successfully bridged D -> Cocoa on Mac OS X.  It was slightly
>complicated, but it works.  I wrote a
>D module that at the moment does nothing more than expose the NSApplicationMain
>function to D, as
>well as a main module that called it.  I then compiled but did not link both
>modules with GDC.  Then I
>used Apple's GCC to link .o files with the Apple Cocoa framework and the static
>libraries from GDC.
>And now when I run it it launches successfully and opens a window!!  Yay!
>
>Owen
>

April 01, 2004
Well, it'll be a little more complicated than that.  The Mac UI toolkit is done
in ObjC, and bridging to
that will require some work.  Luckily the ObjC runtime is done in pure C, so it
is at least theoretically
doable.  Once the runtime is bridged (ie. I can create a D class that will act
as a smart pointer to an
ObjC object), it won't be that difficult, but the runtime will definitely be the
hardest part.

But the fact that I can successfully link against and use the Cocoa libraries is
definitely a step in the
right direction!

Owen

In article <6bvm60h6vqqenatlle40lagrchp4m6kcm1@4ax.com>, Ben Hinkle says...
>
>Excellent! It would be great to get Mac support on the various
>GUI toolkits floating around. :-)
>Good luck
>-Ben
>
>On Thu, 1 Apr 2004 02:15:07 +0000 (UTC), resistor@mac.com wrote:
>
>>I just successfully bridged D -> Cocoa on Mac OS X.  It was slightly
>>complicated, but it works.  I wrote a
>>D module that at the moment does nothing more than expose the NSApplicationMain
>>function to D, as
>>well as a main module that called it.  I then compiled but did not link both
>>modules with GDC.  Then I
>>used Apple's GCC to link .o files with the Apple Cocoa framework and the static
>>libraries from GDC.
>>And now when I run it it launches successfully and opens a window!!  Yay!
>>
>>Owen
>>
>