Easymesh for ESP8266 callback routines

I have question regarding callback routines. I am using Easymesh.h.

The project is about the communication between two ESP8266. I have made 2 programs one for receiver and one for Transmitter. The Transmitter works fine and I can see the data is getting transferred. But on the receiver side I only get the black screen scrolling down.

So the problem is callback function and the one responsible for receiving data setReceiveCallback()

Keeping the code simple, here is a use

static void (*receivedCallback)( uint32_t ID, String &msgFinal);//FIRST

Setup()
{
 mesh.setReceiveCallback( &receivedCallback ); //SECOND
}
loop
{
  void receivedCallback( uint32_t ID, String &msgFinal);//Third

}

If I comment out first and second calls the code compiles without error but doesn't work for receiving.

You are defining a function within the loop:

loop
{
  void receivedCallback( uint32_t ID, String &msgFinal);//Third

}

Do it outside of the loop as the example shows.

I even tried to define it outside... Well both compiles without errorr but no-one catches the data..