test function C++ called by C