expected ‘void (**)(void *, const char *)’ but argument is of type ‘void (*)(void *, const char *)

It is pretty wonky, it wants to return the default error handler. So you have to pass a pointer to a variable. Like this (untested): xmlGenericErrorFunc handler; initGenericErrorDefaultFunc(&handler); If I understand your intentions properly, this is not the function you actually want to use to suppress errors. Use xmlSetGenericErrorFunc() instead. You can use initGenericErrorDefaultFunc() to … Read more