Problems with library X10 - x10ex

Hi all, Having approached recently to Arduino, I started doing some tests with various relay LED buttons sensors etc. etc. all operations that I were quite simple.
Now I wanted to interface to my Arduino Mega can send and receive X10 commands, I implemented the library entered parts of code necessary to its use but still I received to fill the following error:

'PowerLineEvent' was not declared in this scope

powerLineEvent is the event that is generated when an X10 message arrives

obviously firmly inscribed within the code.

I am thinking it was wrong I made a sketch of example by the network (by copying exactly) there also experiencing the same error

by trying to bring him to the bone

I have written:

#include <X10ex.h>
X10ex x10ex = X10ex(2, 4, 5, 6, true, powerLineEvent, 1, 50);

void powerLineEvent(char house, byte unit, byte command, byte extData, byte extCommand, byte remainingBits)
{
}

the error persists :o

I must conclude that it should declare void in some way but there is nothing in the documentation about.
Also if I tried all networked projects that use that library they would return the same error (I have tried 3) so why the others go?
If anyone has had experience with this ... thanks a lot from now on.

P.S. the latest example I downloaded here: x10/X10_Simple.ino at ccb6aa691eb652c1e9f2d8c3a8e5333d7147a57a · tmittet/x10 · GitHub

or here:

libraries here (with another example)
https://code.google.com/archive/p/arduino-x10/downloads

thank you all

Move the definition of the function above the first usage, or use a function declaration.

void powerLineEvent(char house, byte unit, byte command, byte extData, byte extCommand, byte remainingBits);

Sometimes the automatism of the IDE fails.

thank you very much for your intervention.
Tomorrow I reached my seat and try.
thank you so much

...generates another mistake, I thought I'd fill it with version 1.0 and is loaded correctly. I think it's a library compatibility issue with version 1.6
thank you anyway