A C++ library for MGEO