it is mandatory to define the extern "C" in order to allow compilation of library code independent of gcc or g++