[Mono-osx] Cocoa dylib entry point not found
m.j.hutchinson at gmail.com
Wed Jun 13 18:41:46 UTC 2012
On 12 June 2012 19:57, tlapse <tlapse at gmail.com> wrote:
> I'm sure I'm missing something simple; but I'm a Windows .Net person not a
> MAC person.
> In the .h file of my simple cocoa dynamic library I declare a method
> [i]#import <Foundation/Foundation.h>
> #import <Cocoa/Cocoa.h>
> @interface libQLRT : NSObject
> - (NSString*) qlrtsend: (NSString*) request;
> Then in my MonoMac application I reference it
> static extern NSString qlrtsend(NSString request);
> NSString response = qlrtsend(new NSString("test"));
> It finds the lib, but I get an EntryPointNotFound error.
> What magic must I do to declare a method in a Cocoa library so I can
> reference it in MonoMac?
> Is this documented anywhere?
You cannot P/Invoke Objective-C methods; they are not C APIs.
You can use the binding generator to generate bindings:
Or you can manually use the Messaging APIs to send an Obj-C message to
the object - see
More information about the Mono-osx