Plug-in built with Xcode 11 fails to load on Yosemite (10.10)

Thanks a lot, @t0m!

Is it right and enough to reorder the frameworks in the “Link Binary With Library” phase of the Xcode project, as shown in the screenshot, or more needs to be done?

That will do it.

If you’re using a different build system then you need to make sure that -framework AudioUnit appears before -framework AudioToolbox when you invoke the linker.

2 Likes

A bit related to this, would it be possible to add those dependencies in juce_audio_plugin_client.h to the module as stated by JUCE Module Format.txt
OSXFrameworks: (Optional) A list (space or comma-separated) of OSX frameworks that are needed by this module

Right now we add manually AudioUnit and CoreAudioKit in our cmake based generator.
This is done manually in jucer_ProjectExport_Xcode.h
xcodeFrameworks.addTokens (“AudioUnit CoreAudioKit”, false);

Thanks !

3 Likes

Wow, thanks for the fix! :smiley:

Would it fix the VST3 version? In the cmake file we link to frameworks in the following order, the issue is still here:

  target_link_libraries( ${CURRENT_TARGET} PUBLIC
  "-framework AudioUnit"
  "-framework AudioToolbox"
  "-framework AVFoundation"
  "-framework AVKit"
  "-framework Carbon"
  "-framework Cocoa"
  "-framework CoreFoundation"
  "-framework CoreAudio"
  "-framework CoreMedia"
  "-framework CoreMidi"
  "-framework QuartzCore"
  "-framework IOKit"
  "-framework AGL"
  "-framework Accelerate"
  "-framework WebKit"
  "-lobjc"
)

could it be that CMAKE uses them in reverse order?

Could you please provide a few more details?

I can successfully load the AU, VST and VST3 versions of AudioPluginDemo on 10.10.

Why does your vst3 plugin link to the AudioUnit framework? In a normal vst3 Projucer-generated build file this doesn’t happen and really shouldn’t be necessary. Unless you are hosting AudioUnits inside your vst3 and then maybe that’s why it does work for AudioPluginDemo and not for you.

We are not using Projucer, we build JUCE components with cmake instead (much easier to maintain the project files). Probably there was a different issue. The fix was:

SET(CMAKE_OSX_DEPLOYMENT_TARGET 10.11)