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
Tue Dec 15 00:08:54 PST 2015

On Tuesday, 15 December 2015 at 07:52:50 UTC, Jacob Carlborg 
> Could you please add "-v" do the command line when compiling.

Mine was completely different:

$ dmd -v test.d
binary    dmd
version   v2.069
config    /usr/local/bin/dmd.conf
parse     test
importall main
import    object	(/Library/D/dmd/src/druntime/import/object.d)
semantic  main
entry     main      	test.d
semantic2 main
test.d(7): Error: undefined identifier 'selector'
test.d(13): Error: undefined identifier 'selector'
test.d(14): Error: undefined identifier 'selector'

Also, look what I have in my import/core folder. It doesn't match 

atomic.d      checkedint.d  demangle.d    internal/     memory.d  
     simd.d        sync/         thread.d      vararg.d
bitop.d       cpuid.d       exception.d   math.d        runtime.d 
     stdc/         sys/          time.d

So, then I uninstalled dmd via brew, but found it left a 
/Library/D folder behind. Therein lies the problem. So, I did 
sudo brew uninstall --force dmd, sudo su, removed the /Library/D 
folder, and then sudo brew install dmd. Now it works!

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$

More information about the Digitalmars-d-learn mailing list