Error opening example files

Hi I’m a newbie JUCE user. I wanted to check PluginGuiMagic. I cloned GitHub to check examples. When I want to compile them I have this error. Can you help me please? (Mac osx 12.4 - M1 apple - Juce 6.1.6 - Xcode 13.2.1)

Undefined symbol: foleys::MagicGUIState::setResourcesFolder(juce::String const&)

Showing Recent Messages
Ld /Users/md/PluginGuiMagic/examples/APVTS_Tutorial/Builds/MacOSX/build/Debug/ normal (in target ‘PGM-APVTS-Tutorial - Standalone Plugin’ from project ‘PGM-APVTS-Tutorial’)
cd /Users/md/PluginGuiMagic/examples/APVTS_Tutorial/Builds/MacOSX
/Applications/ -target arm64-apple-macos10.11 -isysroot /Applications/ -L/Users/md/PluginGuiMagic/examples/APVTS_Tutorial/Builds/MacOSX/build/Debug -F/Users/md/PluginGuiMagic/examples/APVTS_Tutorial/Builds/MacOSX/build/Debug -filelist /Users/md/Library/Developer/Xcode/DerivedData/PGM-APVTS-Tutorial-afyajcxifequxnctiwjkhzhiowzd/Build/Intermediates.noindex/\ -\ Standalone\ -Xlinker -object_path_lto -Xlinker /Users/md/Library/Developer/Xcode/DerivedData/PGM-APVTS-Tutorial-afyajcxifequxnctiwjkhzhiowzd/Build/Intermediates.noindex/\ -\ Standalone\ -Xlinker -no_deduplicate -stdlib=libc++ -lPGM-APVTS-Tutorial -framework Accelerate -framework AudioToolbox -framework Carbon -framework Cocoa -framework CoreAudio -framework CoreAudioKit -framework CoreMIDI -framework DiscRecording -framework Foundation -framework IOKit -framework OpenGL -framework QuartzCore -framework WebKit -Xlinker -dependency_info -Xlinker /Users/md/Library/Developer/Xcode/DerivedData/PGM-APVTS-Tutorial-afyajcxifequxnctiwjkhzhiowzd/Build/Intermediates.noindex/\ -\ Standalone\ -o /Users/md/PluginGuiMagic/examples/APVTS_Tutorial/Builds/MacOSX/build/Debug/

Undefined symbols for architecture arm64:
“foleys::MagicGUIState::setResourcesFolder(juce::String const&)”, referenced from:
TutorialProcessor::TutorialProcessor() in libPGM-APVTS-Tutorial.a(PluginProcessor.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Hey, not sure if you’ve solved this yet but I was running into the same problem.

It seems that if you have the editor enabled then you need binary data enabled because it calls the setResource function which is only defined if binary data is enabled.

BUT! setResource uses BinaryData:: namespace which is defined in BinaryData.h which is a file that is only created by Projucer (and apparently CMake if you’re using that) if you have some files marked as Binary Resources in the file explorer of Projucer.

To get past this I did the following:

  1. make sure that the FOLEYS_SHOW_GUI_EDITOR_PALETTE and FOLEYS_ENABLE_BINARY_DATA are enabled for the foleys_gui_magic module
  2. Add a magic.xml file to your resources (it must be called that or you must change the reference to BinaryData::magic_xml to BinaryData::{your_file_name_with_underscores} in the constructor for your audio processor)
  3. select the group that contains the new file and you will see the option to mark it as a binary resource. If it was a png or xml it will already be checked.

Now when you load your project, BinaryData.h will have been created with a magic_xml function and all of the dependencies check out. There may be a better way, but this is all I could figure out.

1 Like

Well I get the same error. I’m new to programming and I dont understand how to make this work. Could someone use the foley sinth example to tell me what i should put this? Just as a startup step…

The foleys::MagicProcessor will provide a foleys::MagicProcessorState magicState (protected visibility) to add visualisations or other objects to expose to the GUI.

The floating editor has an auto save, which needs to know the location of your source files. To activate that you need to copy this macro into your foleys::MagicProcessor constructor:


Did you find this post?


  • in the Projucer/cmake add the foleys_gui_magic module
  • nuke the PluginEditor.h and PluginEditor.cpp, and remove the #include "PluginEditor.h" from PluginProcessor.cpp
  • In your PluginProcessor.h change the base class juce::AudioProcessor to foleys::MagicProcessor
  • get rid of the methods hasEditor and createEditor from header and source
  • unless you want to implement them yourself, get rid of getStateInformation and setStateInformation from header and source
  • in the constructor of your processor add this line to the body: FOLEYS_SET_SOURCE_PATH (__FILE__);

That should be all what’s necessary.

N.B. I just pushed a new release, a few obstacles are fixed now

Let me know if that works.

1 Like

I’m pretty sure as a noob that I am missing some easy part of it. Im trying that foley sinth and when building it I get the error below. OFC it cant find the plugin as it doesnt build it, and there is only this error, nothing else. So what could it be? VS2022 Win11 Last JUCE version.
Thank you VERY much!

This is the old problem which should be fixed now. Can you please make sure that you have the latest version of foleys_gui_magic?
If it is in a submodule (e.g. when you cloned PluginGuiMagic), make sure to call

git submodule update --recursive

so it updates the submodules to the version which is set in the main repository…

Let me know if that helped…

Screenshot 2022-11-09 at 23.24.52


It was fixed on the develop branch for a while, but I pushed a new version on main as well like I wrote above…

Well, i guess it is upated…

But why the foleyguimagic.h is not showing it?

The equalizer example doesnt have a subfolder with the foleys stuff… :expressionless:

Somehow I made it work. ROFL. If things are hairy for the experienced, sometimes its a beginner’s luck, hm?

One thing, i tried to put this on a ready plugin code. Everything seemed to work, but that line to be added on pluginprocessor.cpp with the FILE shows an error. Like it is not linked… Thanks for you kind attention, btw

And now i would need to learn how to build stuff with it…

If you need to see examples, how it was done:
In the PluginGuiMagic repository where you found this EqualizerExample, every project has a magic.xml file in the Resources folder. When you load it (it is already loaded when you run the examples) you see the tree in the attached window, just unfold the tree and click some elements. You will get the properties listed in the middle.
And you can resize the three parts (tree, properties and palette of new items).
You can also check the “View…” menu to detach the additional window then you can resize it freely.

Hope that helps a bit

Thank youVERY much! Appreciated