Module problems

modules

#1

Hi, I’m trying to put some of my code into a juce module. But I’m having problems with using it.
I’m getting the following errors:

"UtilityFunctions.h
Error:(19, 17) expected namespace name
Error:(30, 9) unknown type name 'RectanglePlacement'
Error:(30, 82) unknown type name 'RectanglePlacement'
Error:(30, 117) use of undeclared identifier 'RectanglePlacement'
Error:(31, 9) unknown type name 'Justification'
Error:(31, 75) unknown type name 'Justification'
Error:(31, 105) use of undeclared identifier 'Justification'
Error:(34, 5) unknown type name 'Drawable'
LookAndFeel.h
Error:(22, 32) use of undeclared identifier 'juce'
Error:(22, 38) expected class name
Error:(25, 23) unknown type name 'Graphics'
Error:(26, 31) unknown type name 'Graphics'
Error:(26, 156) unknown type name 'Slider'
Error:(27, 32) unknown type name 'Graphics'
Error:(33, 9) unknown type name 'Rectangle'
Error:(33, 18) expected member name or ';' after declaration specifiers
Base.h
Error:(21, 25) expected class name
Error:(31, 93) unknown type name 'RectanglePlacement'
Error:(61, 28) unknown type name 'Graphics'
include_neubau_layout.cpp
Error:too many errors emitted, stopping now [-ferror-limit=]

So the these are all juce classes missing.

My master header file looks like this:

 BEGIN_JUCE_MODULE_DECLARATION

  ID:                 neubau_layout
  vendor:             neubau
  version:            0.0.1
  name:               Neubau Json Layout
  description:        A system of classes that let's you layout your gui using json.
  website:            http://www.neubau.io
  minimumCppStandard: 14

  dependencies:       juce_core, juce_graphics, juce_gui_basics

 END_JUCE_MODULE_DECLARATION

*******************************************************************************/

#pragma once
#define NEUBAU_LAYOUT_H_INCLUDED

#include "Json/json.hpp"

#include "Expanders/StyleExpander.h"
#include "Expanders/TemplateExpander.h"
#include "Expanders/ConstantExpander.h"
#include "Expanders/JsonExpander.h"

#include "Utility/UtilityFunctions.h"
#include "LookAndFeel/LookAndFeel.h"

#include "Components/Base.h"
#include "Components/Button.h"
#include "Components/Knob.h"
#include "Components/Label.h"
#include "Components/ModulatorIcon.h"
#include "Components/Stack.h"

#include "Builders/AbstractBuilder.h"
#include "Builders/BaseBuilder.h"
#include "Builders/ButtonBuilder.h"
#include "Builders/KnobBuilder.h"
#include "Builders/LabelBuilder.h"
#include "Builders/ModulatorBuilder.h"
#include "Builders/StackBuilder.h"
#include "Builders/LayoutBuilder.h"

My master cpp file looks like this:

#ifdef NEUBAU_LAYOUT_H_INCLUDED
 #error "Incorrect use of JUCE cpp file"
#endif
#include "neubau_layout.h"
#include "LookAndFeel/LookAndFeel.cpp"
#include "Utility/UtilityFunctions.cpp"
#include "Expanders/StyleExpander.cpp"
#include "Expanders/TemplateExpander.cpp"

Any ideas what’s going on?


#2

Nevermind, I have to include the juce modules in my header file. I thought the dependencies line would do that for me.