[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mex using Objective-C and Cocoa

From: Cesar V. Ramirez
Subject: Re: mex using Objective-C and Cocoa
Date: Sun, 21 Aug 2016 05:32:30 -0700

Thanks for the suggestion.  And although I still want something similar, my requirements changed a bit.  So I'm now attaching the following:

SayHello.c                  (function for mex)
NameRandomizer.h   (objc)(also in xcode project)
NameRandomizer.m  (objc)(also in xcode project)

libMyLibrary.a  (lib created with objc)   (xcode project that creates lib)

with the above, I can

>> mex SayHello.c libMyLibrary.a

and produce a mex file that works.  The C code in SayHello.c calls a "C-Signatured-Function" contained in the static library, that's written in ObjC.

There would be two really cool things to do.  (1) not have to create a separate library just to add a simple wrapper.. although, really, that workaround isn't bad...

And (2) ideally, and I just ran across this idea today, is to be able to create a static library that references Octave libraries and so you can #import "mex.h" and have those available in there.  That way a set of utility routines could be included via that library when creating mex files in the future.  Written any language.

I think I'll actually make another posting about that, since it's different than the subject line of this post.

On Sat, Aug 20, 2016 at 6:58 AM, Ben Abbott <address@hidden> wrote:
On Aug 20, 2016, at 05:35, Cesar V. Ramirez <address@hidden> wrote:

Hello Octave Experts,

I'm trying to build a simple app in Objective-C using the Cocoa.framework, on Mac OSX.  I know it's not an officially supported language, but postings such as the below seem to suggest it's possible.

(these are from matlab forums, because i didn't find any here...)

Preferably, I could launch a form, but I'd take anything.

Can anyone give me a reference or provide some steps?

If the code can exist in an xcode project that be would preferred.

thanks in advance

I suggest you attach a simple example someone can try.

In any event, clang does work (with cocoa also) . So I assume your objective-c code will compile.


Description: Zip archive

reply via email to

[Prev in Thread] Current Thread [Next in Thread]