[Issue 15444] [Interfacing to Objective-C]

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Dec 15 00:16:11 PST 2015


https://issues.dlang.org/show_bug.cgi?id=15444

Maximo <reach.supermike at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Maximo <reach.supermike at gmail.com> ---
Here's the fix. It has to do with El Capitan and brew.

I found the fix:

$ sudo brew update
$ sudo brew uninstall --force dmd
$ sudo su
$ cd /Library
$ rm -rfd D
$ exit
$ sudo brew install dmd

This not only takes one from an older dmd to a more current version (in my
case, from 2.068 to 2.069), but it also fixes a bug where /Library/D doesn't
get updated. (Besides, the El Capitan version of 2.069 now doesn't use
/Library/D.)

When I did that, I found I was able to compile like so:

volomike:cpptod4 mike$ dmd -m64 -L-framework -LFoundation test.d
volomike:cpptod4 mike$ ls
test    test.d    test.o
volomike:cpptod4 mike$ ./test
2015-12-15 03:07:52.669 test[7308:116958] Hello World!
volomike:cpptod4 mike$

So, it not only used an Objective C NSString object, but it fed it to NSLog and
I got console output in NSLog format.

--


More information about the Digitalmars-d-bugs mailing list