Linking a JUCE static lib in existing Xcode iOS project [SOLVED]


#1

Hi all, I’m testing out adding a JUCE static library into an existing iOS Xcode project.

I’ve hit the following linker errors when building for the simulator and not sure what I’m missing. It looks like its all iOS specific stuff it can’t find.

Undefined symbols for architecture x86_64:
  "_kUTTagClassFilenameExtension", referenced from:
      juce::FileChooser::Native::getUTTypesForWildcards(juce::String const&, juce::String&) in libMyJuceLib.a(include_juce_gui_basics.o)
  "_vDSP_vclipD", referenced from:
      juce::FloatVectorOperations::clip(double*, double const*, double, double, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_UTTypeCreatePreferredIdentifierForTag", referenced from:
      juce::FileChooser::Native::getUTTypesForWildcards(juce::String const&, juce::String&) in libMyJuceLib.a(include_juce_gui_basics.o)
  "_vDSP_vclip", referenced from:
      juce::FloatVectorOperations::clip(float*, float const*, float, float, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vmaxD", referenced from:
      juce::FloatVectorOperations::max(double*, double const*, double const*, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vmax", referenced from:
      juce::FloatVectorOperations::max(float*, float const*, float const*, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vma", referenced from:
      juce::FloatVectorOperations::addWithMultiply(float*, float const*, float const*, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vmin", referenced from:
      juce::FloatVectorOperations::min(float*, float const*, float const*, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vnegD", referenced from:
      juce::FloatVectorOperations::negate(double*, double const*, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vsmaD", referenced from:
      juce::FloatVectorOperations::addWithMultiply(double*, double const*, double, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vneg", referenced from:
      juce::FloatVectorOperations::negate(float*, float const*, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vmulD", referenced from:
      juce::FloatVectorOperations::multiply(double*, double const*, int) in libMyJuceLib.a(include_juce_audio_basics.o)
      juce::FloatVectorOperations::multiply(double*, double const*, double const*, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vsma", referenced from:
      juce::FloatVectorOperations::addWithMultiply(float*, float const*, float, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vsub", referenced from:
      juce::FloatVectorOperations::subtract(float*, float const*, int) in libMyJuceLib.a(include_juce_audio_basics.o)
      juce::FloatVectorOperations::subtract(float*, float const*, float const*, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vsadd", referenced from:
      juce::FloatVectorOperations::add(float*, float, int) in libMyJuceLib.a(include_juce_audio_basics.o)
      juce::FloatVectorOperations::add(float*, float const*, float, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vclr", referenced from:
      juce::FloatVectorOperations::clear(float*, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vsmulD", referenced from:
      juce::FloatVectorOperations::copyWithMultiply(double*, double const*, double, int) in libMyJuceLib.a(include_juce_audio_basics.o)
      juce::FloatVectorOperations::multiply(double*, double, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vsmul", referenced from:
      juce::FloatVectorOperations::copyWithMultiply(float*, float const*, float, int) in libMyJuceLib.a(include_juce_audio_basics.o)
      juce::FloatVectorOperations::multiply(float*, float, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vminD", referenced from:
      juce::FloatVectorOperations::min(double*, double const*, double const*, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vmaD", referenced from:
      juce::FloatVectorOperations::addWithMultiply(double*, double const*, double const*, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vadd", referenced from:
      juce::FloatVectorOperations::add(float*, float const*, int) in libMyJuceLib.a(include_juce_audio_basics.o)
      juce::FloatVectorOperations::add(float*, float const*, float const*, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vfillD", referenced from:
      juce::FloatVectorOperations::fill(double*, double, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vmul", referenced from:
      juce::FloatVectorOperations::multiply(float*, float const*, int) in libMyJuceLib.a(include_juce_audio_basics.o)
      juce::FloatVectorOperations::multiply(float*, float const*, float const*, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vsubD", referenced from:
      juce::FloatVectorOperations::subtract(double*, double const*, int) in libMyJuceLib.a(include_juce_audio_basics.o)
      juce::FloatVectorOperations::subtract(double*, double const*, double const*, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vsaddD", referenced from:
      juce::FloatVectorOperations::add(double*, double const*, double, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vabsD", referenced from:
      juce::FloatVectorOperations::abs(double*, double const*, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vfill", referenced from:
      juce::FloatVectorOperations::fill(float*, float, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vclrD", referenced from:
      juce::FloatVectorOperations::clear(double*, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vabs", referenced from:
      juce::FloatVectorOperations::abs(float*, float const*, int) in libMyJuceLib.a(include_juce_audio_basics.o)
  "_vDSP_vaddD", referenced from:
      juce::FloatVectorOperations::add(double*, double const*, int) in libMyJuceLib.a(include_juce_audio_basics.o)
      juce::FloatVectorOperations::add(double*, double const*, double const*, int) in libMyJuceLib.a(include_juce_audio_basics.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


#2

It was due to missing required frameworks that are used by JUCE: Accelerate and MobileCoreServices