I Did It! Calling D Library from Objective C in XCode on OSX
Mike McKee via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Dec 14 10:13:02 PST 2015
On Monday, 14 December 2015 at 17:28:20 UTC, Jacob Carlborg wrote:
> [1] http://dlang.org/spec/objc_interface.html
Unfortunately, my version of DMD on this OSX doesn't support the
(Objective-C) extern when I run the example given at the bottom
of that objc_interface.html page.
$ dmd -m64 -L-framework -LFoundation test.d
test.d(5): Error: valid linkage identifiers are D, C, C++,
Pascal, Windows, System
test.d(5): Error: found '-' when expecting ')'
test.d(5): Error: no identifier for declarator C
test.d(5): Error: declaration expected, not ')'
test.d(9): Error: unrecognized declaration
$ dmd --version
DMD64 D Compiler v2.068
Copyright (c) 1999-2015 by Digital Mars written by Walter Bright
I think I installed dmd through homebrew. I don't know how to
update it -- I'm still green when it comes to homebrew and only
know apt-get from Ubuntu Linux.
More information about the Digitalmars-d-learn
mailing list