Undefined Reference - different library structure

Hello together,

i get some undefined reference due to my different organising structure of my libraries.

#include "Project.h"

ModulA modula;
ModulB modulb;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  modula.execute();
  modulb.execute();
}

I get this errors:

C:\Users\Tobs\Documents\Arduino\ProjectTest/ProjectTest.ino:13: undefined reference to `ModulA::execute()'

C:\Users\Tobs\Documents\Arduino\ProjectTest/ProjectTest.ino:14: undefined reference to `ModulB::execute()'

sketch\ProjectTest.ino.cpp.o: In function `__static_initialization_and_destruction_0':

C:\Users\Tobs\Documents\Arduino\ProjectTest/ProjectTest.ino:3: undefined reference to `ModulA::ModulA()'

C:\Users\Tobs\Documents\Arduino\ProjectTest/ProjectTest.ino:4: undefined reference to `ModulB::ModulB()'

C:\Users\Tobs\Documents\Arduino\ProjectTest/ProjectTest.ino:4: undefined reference to `ModulA::~ModulA()'

C:\Users\Tobs\Documents\Arduino\ProjectTest/ProjectTest.ino:4: undefined reference to `ModulB::~ModulB()'

The code ist available on github where you can see the structure of the libraries.
https://github.com/huetob/ArduinoIncludeTest

#ifndef Project_h
#define Project_h

#include "Wire.h"
#include "Arduino.h"

#include "source/ModulA/ModulA.h"
#include "source/ModulB/ModulB.h"

#endif //Project_h

If I include the .cpp files, no errors appear. But I think thats the worng way to deal with this problem.

I hope that someone can help me.

Have a nice day,
Tobs

You should not be using a path in the include statement. When the IDE copies files to the build directory, the structure is flat - everything at the same level, so your include file won't be where you say it is.

You can't hide the use of a library (ModulA and ModulB) from the sketch.

Thanks for your fast reply. But how can i have such a structure?
This is just an example of the current library structure. I have over 30 libraries from this project only and i want to split them in diffrent parts like: Sensors, Motors, Math and Other Stuff.
I dont want have every single library in the libraries direction because it will be too much.

Regards,
Tobias