Linking problem on mac


Xcode has a trouble in linking, which I can’t explain:

Checking Dependencies Ld /Developer/Projects/Debug/ normal i386 cd "/Volumes/JUCE/extras/audio plugins/On The Road/build/Standalone_Mac" /usr/bin/g++-4.0 -o /Developer/Projects/Debug/ -L/Developer/Projects/Debug -L../../../../../bin -F/Developer/Projects/Debug -F../../../../../bin -filelist /Developer/Build\ Files/ -framework Carbon -framework CoreAudio -framework AGL -framework QuickTime -framework IOKit -arch i386 -Wl,-Y,1455 /usr/bin/ld: Undefined symbols: juce::MidiBuffer::MidiBuffer() juce::MidiBuffer::~MidiBuffer() juce::TextButton::changeWidthToFitText(int) ... goes on with basically all juce classes

I made sure to link to the debug library, and I specified the direct path to juce library : /Volumes/JUCE/bin into the “Library Search Paths” field.

I don’t know where to look at to solve this problem , someone has an idea ?




It doesn’t look like the linker actually has anything in there to tell it to link to the juce lib. Double-check inside your target settings that it’s in the list of objects to use during the link step.


yes, libjucedebug is inside the list of object,

I actually went back to JUCEHelloworldApplication (which compiles fine), and made a step by step…

So here are 2 lines added to JUCEHelloworldApplication (in blue) which gives me the linking error :

class JUCEHelloWorldApplication : public JUCEApplication
HelloWorldWindow* helloWorldWindow;
[color=blue]AudioDeviceManager *audioDeviceManager;[/color]
: helloWorldWindow (0)


void initialise (const String& commandLine)
[color=blue]audioDeviceManager=new AudioDeviceManager();[/color]
helloWorldWindow = new HelloWorldWindow();


[quote]Ld /Developer/Projects/Debug/ normal i386
cd “/Volumes/JUCE/extras/example projects/example_project_for_Mac”
/usr/bin/g+±4.0 -o /Developer/Projects/Debug/ -L/Developer/Projects/Debug -L…/…/juce/bin -F/Developer/Projects/Debug -filelist /Developer/Build\ Files/ /Volumes/JUCE/bin/libjucedebug.a -framework Carbon -framework CoreAudio -framework AGL -framework QuickTime -framework IOKit -arch i386 -Wl,-Y,1455
/usr/bin/ld: warning -L: directory name (…/…/juce/bin) does not exist
/usr/bin/ld: Undefined symbols:

I also tried in win32 and this compiled fine.

Any idea ?


Oh, well if you’re missing stuff like MIDIClientCreate, then all you need to do is add some apple frameworks to your project - in this case, I guess you need the CoreMidi framework.


Thanks Jules, for some reason I was thinking this was a juce linking problem… even if there was no ‘juce’ in there … doh

Problem solved…