Xcode 12 compiler error

When I compile a project with VSTGUI 3.6 to arm64 in Xcode 12 I get an error “No matching function for call to ‘objc_msgSendSuper’” (cocoasupport.mm).
The error does not appear when I compile to x86_64.
Moving the project to a newer VSTGUI version is not an option. VSTGUI 4 is too different.

It looks like the compiler will now (optionally) strictly check the types of calls to obj_msgSend. You will have use a correctly-typed function pointer in place of directly calling objc_msgSend.

Example given:

    #include <objc/message.h>
    void foo(void *object) {
      typedef void (*send_type)(void *, SEL, int);
      send_type func = (send_type)objc_msgSend;
      func(object, sel_getUid("foo:"), 5);

Do I need to rewrite cocoasupport.mm or is there a more elegant solution?


Here too with VSTGUI 4.9.

Same issue pops up with caviewlayer.mm, cocoaopenglview.mm, cocoatextedit.mm, nsviewframe.mm… This only seems to be happening when building for Apple Silicon support.

As far as I can tell, looking at the release notes and announcements in this forum, it has not been officially stated that VST3 supports the latest M1/arm Apple chipset. And clearly from these reports, it shows that it doesn’t (at least on the VSTGUI layer, which is somewhat optional…). Hopefully the next version of the SDK will officially support it.

The iOS versions of my apps compile fine under xcode 12.

I have the latest VST SDK successfully build on Apple Silicon and I can load all VSTGUI based example without problems in the editorhost example. What issues exactly do you have with VSTGUI 4.9?

I’m attaching a couple screenshots of one of the errors. I wonder if this is because I’m building a standalone application and my editor is derived from PlugGuiEditor?

Looks like you are not using the latest VSTGUI 4.9. See https://github.com/steinbergmedia/vstgui/blob/master/vstgui/lib/platform/mac/cocoa/cocoatextedit.mm#L72
how this code looks like in 4.9

I’m pretty sure that was from the 4.9 ‘release’. I’ll update tomorrow and see how it goes. Thanks.

Using the ‘Master’ 4.9 branch, I’m now able to properly build for Apple Silicon. Thank-you Arne. I ran into several issue building on Windows, however, and I’ve created some pull requests with fixes. One additional issue that I ran into, for which I didn’t make a pull reqeust is as follows:

My fix, which is not very elegant, is to add some lines at the top of malloc.h. Perhaps you can think of a better fix?

I think I fixed this one on the develop branch already, so you just have to include vstguidebug.h. Don’t know why you need the defines there.

If I don’t have those defines in there, I get the error shown below. This is really bizarre because that macro is defined in vstguibase.h which is already included. Stranger yet, I notice that vstguidebug.h is already included at the end of vstguibase.h, so I’m really at a loss as to what’s happening here.