Creating user modules tutorial?


That is exactly the case. When you see it in Projucer AND saved the project, it should appear in “JUCE Modules”, when you expand by clicking the unfold-triangle in VS.
Sometimes IDEs in general fail to update the project, if that happens try to close and reopen the project.


I was missing that I had to do the ‘add a module’ part in the projucer project. I thought pointing the projucer to the user module path would mean the juce header would include my modules or something. Just gotta fix the files includes to each other now! thanks


One of my classes inherits from the Component class. So what’s the proper way of inheriting the class? At the top of that class file? On the actual module BEGIN_JUCE_MODULE_DECLARATION .h file? Doing either & using namespace juce on the inheriting class file both just gives me lots of syntax errors for ‘errors’ on the juce_Component.h file.


you add juce_core and juce_gui_basics as dependencies, and add in your myModule.h:

dependencies: juce_core, juce_gui_basics

and afterwards (outside the comment)

#include <juce_core/juce_core.h>
#include <juce_gui_basics/juce_gui_basics.h>



Cool thanks! The process of including everything correctly and namespace juce’ing etc etc was quite long but all my modules work now :smiley: thank you daniel!
one last question… why do you finish every post with HTH… what does it mean? …just checked urban dictionary and apparently its happy to help/hope that helps? Well thanks for being helpful!


I read it as “hope that helps”, wasn’t aware, that it has two meanings… thanks for making me aware :slight_smile:
Glad it works now!


Is there a special way to call custom module code from another custom module? I can’t seem to get it to work.

My first module contains ClassA and my second module contains ClassB. ClassB has a member variable ClassA. I have copied the format of the juce modules and added both classes to the juce namespace.

On compilation I get the error Unknown type name 'ClassA'. I can include other juce classes from here and XCode’s autocomplete suggests this class. I can also call both classes from the main program.


You can make one module depend on the other one, but not in both directions. In that case you have to put both in one module, which is perfectly fine.