D/Objective-C, extern (Objective-C)
Jacob Carlborg
doob at me.com
Sun Jun 23 13:24:41 PDT 2013
As some of you might know Michel Fortin created a fork of DMD a couple
of years ago which add support for using Objective-C classes and calling
Objective-C method. That is making D ABI compatible with Objective-C.
I have now updated it to the latest version of DMD and druntime. All
D/Objective-C tests pass and all standard tests pass. I'm planning to
create a DIP for this and would really like this to be folded into main
line. For know you can read the design document created by Michel:
http://michelf.ca/projects/d-objc/syntax/
Original project page: http://michelf.ca/projects/d-objc/
My forks:
DMD: https://github.com/jacob-carlborg/dmd/tree/d-objc
druntime: https://github.com/jacob-carlborg/druntime/tree/d-objc
Phobos: standard Phobos, commit f85bd54ef5615986960fdd68ea87c8aaf5c5118d
Currently I have limited bandwidth and cannot upload a pre-compiled
binary. To compile use the following commands:
cd dmd/src
make -f posix.mak MODEL=32 D_OBJC=1
cd druntime
make -f posix.mak DMD=../dmd/src/dmd MODEL=32 D_OBJC=1
cd phobos
make -f posix.mak DMD=../dmd/src/dmd MODEL=32
Currently D/Objc only works for 32bit. You can use Michel's example
application, Chocolate, to try it out. It's a bit cumbersome to compile
without Xcode but it's possible.
http://littoral.michelf.ca/code/d-objc/chocolate-dobjc-a1.zip
--
/Jacob Carlborg
More information about the Digitalmars-d-announce
mailing list