Link Error


#1

Hi Jules,

I’ve just updated today to the latest git trunk and get this error at link time for the release version of my app (works fine for the debug one and I tried a clean build)
10.5 base SDK

Undefined symbols:
OBJC_CLASS$_CIContext”, referenced from:
objc-class-ref-to-CIContext in JuceLibraryCode4.o

Does it ring a bell ?

Thanks,


#2

You might need to add the QuartzCore framework to your project (the introjucer should add it automatically if you use it to manage the project)


#3

That did the trick.

Thanks,


#4

hmm, I just rebuilt from the latest GIT and Im having a few linking errors as well, looks like CoreAudio? (although CoreAudio seems to be linked…)

Undefined symbols for architecture i386:
  "_AudioFileGetGlobalInfo", referenced from:
      juce::CoreAudioFormat::CoreAudioFormat() in JuceLibraryCode4.o
  "_AudioFileOpenWithCallbacks", referenced from:
      juce::CoreAudioReader::CoreAudioReader(juce::InputStream*) in JuceLibraryCode4.o
  "_ExtAudioFileWrapAudioFileID", referenced from:
      juce::CoreAudioReader::CoreAudioReader(juce::InputStream*) in JuceLibraryCode4.o
  "_ExtAudioFileGetProperty", referenced from:
      juce::CoreAudioReader::CoreAudioReader(juce::InputStream*) in JuceLibraryCode4.o
  "_ExtAudioFileSetProperty", referenced from:
      juce::CoreAudioReader::CoreAudioReader(juce::InputStream*) in JuceLibraryCode4.o
  "_ExtAudioFileSeek", referenced from:
      juce::CoreAudioReader::readSamples(int**, int, int, long long, int) in JuceLibraryCode4.o
  "_ExtAudioFileRead", referenced from:
      juce::CoreAudioReader::readSamples(int**, int, int, long long, int) in JuceLibraryCode4.o
  "_ExtAudioFileDispose", referenced from:
      juce::CoreAudioReader::~CoreAudioReader() in JuceLibraryCode4.o
  "_AudioFileClose", referenced from:
      juce::CoreAudioReader::~CoreAudioReader() in JuceLibraryCode4.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

  "_AudioFileGetGlobalInfo", referenced from:


      juce::CoreAudioFormat::CoreAudioFormat() in JuceLibraryCode4.o


  "_AudioFileOpenWithCallbacks", referenced from:


      juce::CoreAudioReader::CoreAudioReader(juce::InputStream*) in JuceLibraryCode4.o


  "_ExtAudioFileWrapAudioFileID", referenced from:


      juce::CoreAudioReader::CoreAudioReader(juce::InputStream*) in JuceLibraryCode4.o


  "_ExtAudioFileGetProperty", referenced from:


      juce::CoreAudioReader::CoreAudioReader(juce::InputStream*) in JuceLibraryCode4.o


  "_ExtAudioFileSetProperty", referenced from:


      juce::CoreAudioReader::CoreAudioReader(juce::InputStream*) in JuceLibraryCode4.o


  "_ExtAudioFileSeek", referenced from:


      juce::CoreAudioReader::readSamples(int**, int, int, long long, int) in JuceLibraryCode4.o


  "_ExtAudioFileRead", referenced from:


      juce::CoreAudioReader::readSamples(int**, int, int, long long, int) in JuceLibraryCode4.o


  "_ExtAudioFileDispose", referenced from:


      juce::CoreAudioReader::~CoreAudioReader() in JuceLibraryCode4.o


  "_AudioFileClose", referenced from:


      juce::CoreAudioReader::~CoreAudioReader() in JuceLibraryCode4.o


ld: symbol(s) not found for architecture i386


clang: error: linker command failed with exit code 1 (use -v to see invocation)



#5

You need the Quartzcore framework for those. Again, if you use the latest version of the introjucer, it should sort that out for you automatically.


#6

Hmm, the project was generated with the introjucer and it appears to be linked? (see image attached), thanks!


#7

The screenshot really wasn’t necessary, I’ve seen a failed link before!

Maybe you’re not running the latest introjucer? If you are, it should add quartzcore to the frameworks.


#8

Ah, looks like I hadn’t recompiled IntroJucer in a couple days, doh! Not sure why manually linking myself didn’t work, but recompiled introjucer, and reopened the project and its working well. Thanks link master!


#9

(Sorry, I actually didn’t mean quartzcore, I meant audiotoolkit…)