JUCE module paths - can you spot the stupid mistake?

Hello,

I ran into an odd problem today while trying to compile a test plugin. I get an error message stating that at least one of the module paths is not set. Strangely, this worked until recently and I don’t see anything that would likely cause this problem.

Note: I confirmed that all of the module paths make sense (see further down) & this project does compile with no problems when done directly in Xcode 10.

The script:

echo "resave and compile"
/Applications/Projucer.app/Contents/MacOS/Projucer --resave $HOME/Documents/SourceControl/SineSynth/SineSynth.jucer
/Applications/Projucer.app/Contents/MacOS/Projucer --resave-resources $HOME/Documents/SourceControl/SineSynth/SineSynth.jucer
cd $HOME/Documents/SourceControl/SineSynth/Builds/MacOSX/
xcodebuild -project SineSynth.xcodeproj -configuration Debug

The error message:

resave and compile
Re-saving file: /Users/me/Documents/SourceControl/SineSynth/SineSynth.jucer
Error when saving: At least one of your JUCE module paths is invalid!
Please go to the Modules settings page and ensure each path points to the correct JUCE modules folder.

The module path is shown here & is the same for all modules:

Thank you!

You have “Use global path for this module” checked. You need to verify that the global paths (in Projucer > Global Paths) make sense as well, or you need to uncheck “Use global path for this module” to use the path specified in the field above.

Thank you McMartin. They are set in the way that makes sense, I believe…that is why this is so strange. Unless I am misunderstanding something, of course.

Could you click through each module and see which one is missing?
Maybe not all modules are set to use the global path.

Please try to add one module with “Add a module from a specified folder” button, I had also a very awkward problem, which was gone once I used this function.

2 Likes

Well, that worked thank you very much chkn.

The global path was set right, and the modules were all found, but still I got the error.

So, I removed all of the modules from the project, saved, then re-added them using “add file from a specific folder…” & it works.

Not exactly optimal & certainly confusing, but if anyone else has this problem, that is all that needs to be done.

One warning, though - adding the modules this way in Projucer turns off the ‘use global paths’ setting.

1 Like

I had a similar situation where a module was not included in XCode despite adding it from Projucer.

I resolved the issue by doing the following:

  • Delete the Builds and JuceLibraryCode directories from your project directory.
  • Remove the module and adding it again using the “Add a module from a specified folder” option.

Hope it helps :slight_smile:

2 Likes

@anoesisaudio
I did the same but it did not solve my problem. The exact same error persists. So did you check the use Global Paths checkbox again after adding the modules or yo left it unchecked?

Hi @kenobi. I don’t remember at this point. Once Juce 6 was released I started using cmake instead of the Projucer, which I recommend.

My guess is you probably want it checked. Good luck!

1 Like

Thanks
I actually removed the checkbox for Global Path and then used absolute path and that solved the issue. Thanks a lot. I have not used the cmake but I will check that out too.

There’s also a thing, I think, where if you add your JUCE folder (without /modules) to the modules path it looks like it’s going to work and you get a green light from the Projucer but then when you run it in the IDE it can’t find things, e.g.

image