On 2015-07-30 12:19, ponce wrote:
Based on prior Jacob Carlborg'work (AFAIK) and inspired by DerelictCF
(https://github.com/Extrawurst/DerelictCF), DerelictCocoa is an
elaborated hack to be able to use Cocoa without Xcode (tm).
It does _not_ rely on the recent extern(Objective-C) additions so I'm a
bit unsure how far the compatibility will go in the OS X lineage.
This is an unofficial Derelict package, so use at your own risk.
I had a quick look at the implementation. You're not using the
objc_msgSend_* family of functions correctly. That's one of the main
reasons why extern(Objective-C) was implemented. I strongly recommend
you adapting extern(Objective-C) instead. At least read the commit
message  for the commit which implements extern(Objective-C). It
explains how objc_msgSend_* works.
I can provide more detail if necessary.