error.h: add extern "C" for C++