Undefined symbols in JuceAudioPlugin Demo


#1

I downloaded the current JuceAudioPlugin @ http://www.rawmaterialsoftware.com/juce/downloads/JuceAudioPlugin_1_15.zip. When I try to build using the Xcode project at JuceAudioPlugin/demo/build/AudioUnit/JuceDemoAU.xcodeproj I get a complaint of undefined symbols:

ld: Undefined symbols:
__Z45juce_setCurrentExecutableFileNameFromBundleIdRKN4juce6StringE
/Users/ThaneQ/Develop/JuceAudioPlugin/demo/build/AudioUnit/build/JuceDemoAU.build/Debug/JuceAU.build/Objects-normal/ppc/juce_AudioUnitWrapper-6180B671.o reference to undefined __Z45juce_setCurrentExecutableFileNameFromBundleIdRKN4juce6StringE

I am using the latest version of Xcode (2.4.1).

It appears to want the juce_setCurrentExecutableFileNameFromBundleId() function in juce/build/macosx/platform_specific_code/juce_mac_Files.cpp. But, when I add that file to that file to my JuceDemoAU Xcode project, it still doesn’t find the symbol.

Perhaps I’m missing something obvious… is it a namespace issue?

Any other ideas?

Thanks!
Thane Heninger


#2

I think I realized the problem.

juce_AudioUnitWrapper.cpp contains a reference to juce_setCurrentExecutableFileNameFromBundleId() which is not inside a namespace. The function in juce_mac_Files.cpp puts it inside the namespace.

So, I changed the declaration to show:

BEGIN_JUCE_NAMESPACE

extern void juce_setCurrentExecutableFileNameFromBundleId (const String& bundleId);

END_JUCE_NAMESPACE

And it now seems to build correctly.

Thanks,
Thane


#3

Ah, yes. That was a silly mistake, thanks for spotting it!


#4