You should only include the relevant header file in the file Gestion_Porte.hpp, not Mysensors.h For example #include <core/MyTransport.h>