I have created a library of functions that doesn't have and mustn't have a class. In order to have functions inside the library that can only be called from the library itself, you just write them into the .cpp file and leave them out of the header file completely. Here is the .cpp file of the library (the header file is empty):
#include "Lib.h"
// Definition of foo1
static void foo1(){
foo2();
}
// Definition of foo2
static void foo2() {}
When including the library in an empty sketch and compiling it I get the following error message:
error: 'foo2' was not declared in this scope
What is the problem here?