Using CoreAudio, CoreMIDI e.t.c with juce static library


#1

Hello, I'm fairly new to OSX and been using it for few days so far.

I'm trying to port a windows crossplatform project which use juce static library to OSX.

I've built new static lib (.a) and linked it to a project.

However I'm getting an error:

Undefined symbols for architecture x86_64:

  "_MIDIEntityGetDevice", referenced from:

      juce::CoreMidiHelpers::getEndpointName(unsigned int, bool) in libjuce.a(juce_audio_devices.o)

  "_MIDIDeviceGetNumberOfEntities", referenced from:

      juce::CoreMidiHelpers::getEndpointName(unsigned int, bool) in libjuce.a(juce_audio_devices.o)

  "_MIDIPortDispose", referenced from:

      juce::MidiOutput::~MidiOutput() in libjuce.a(juce_audio_devices.o)

  "_MIDIEndpointDispose", referenced from:

      juce::MidiOutput::~MidiOutput() in libjuce.a(juce_audio_devices.o)

  "_kMIDIPropertyConnectionUniqueID", referenced from:

      juce::CoreMidiHelpers::getConnectedEndpointName(unsigned int) in libjuce.a(juce_audio_devices.o)

  "_MIDISend", referenced from:

      juce::MidiOutput::sendMessageNow(juce::MidiMessage const&) in libjuce.a(juce_audio_devices.o)

  "_MIDIEndpointGetEntity", referenced from:

      juce::CoreMidiHelpers::getEndpointName(unsigned int, bool) in libjuce.a(juce_audio_devices.o)

  "_AudioGetCurrentHostTime", referenced from:

      juce::MidiOutput::sendMessageNow(juce::MidiMessage const&) in libjuce.a(juce_audio_devices.o)

  "_MIDIObjectFindByUniqueID", referenced from:

      juce::CoreMidiHelpers::getConnectedEndpointName(unsigned int) in libjuce.a(juce_audio_devices.o)

  "_MIDIObjectGetDataProperty", referenced from:

      juce::CoreMidiHelpers::getConnectedEndpointName(unsigned int) in libjuce.a(juce_audio_devices.o)

  "_MIDIReceived", referenced from:

      juce::MidiOutput::sendMessageNow(juce::MidiMessage const&) in libjuce.a(juce_audio_devices.o)

  "_MIDIObjectGetStringProperty", referenced from:

      juce::MidiOutput::openDevice(int) in libjuce.a(juce_audio_devices.o)

      juce::CoreMidiHelpers::getMidiObjectName(unsigned int) in libjuce.a(juce_audio_devices.o)

  "_MIDIGetNumberOfDestinations", referenced from:

      juce::MidiOutput::openDevice(int) in libjuce.a(juce_audio_devices.o)

  "_MIDIOutputPortCreate", referenced from:

      juce::MidiOutput::openDevice(int) in libjuce.a(juce_audio_devices.o)

  "_MIDIGetDestination", referenced from:

      juce::MidiOutput::openDevice(int) in libjuce.a(juce_audio_devices.o)

  "_MIDIClientCreate", referenced from:

      juce::CoreMidiHelpers::getGlobalMidiClient() in libjuce.a(juce_audio_devices.o)

  "_kMIDIPropertyName", referenced from:

      juce::MidiOutput::openDevice(int) in libjuce.a(juce_audio_devices.o)

      juce::CoreMidiHelpers::getMidiObjectName(unsigned int) in libjuce.a(juce_audio_devices.o)

ld: symbol(s) not found for architecture x86_64

Looks like it lacks CoreAudio and CoreMIDI frameworks.

The problem is I actually linked CoreAudio and CoreMIDI frameworks to a new project, also I've included needed headers for these frameworks  right before juce header.

Still it gives errors above and obviously I'm doing something wrong. Can someone point out what am I missing? 


#2

I've completely forgot framework I'm working with use it's own custom build system.

I've solved problem with using it's PublicFrameworks.Add() thing.