added SP_EXTERN to SPVertex functions, requires extern "C" when compiled with C++