mex example: howto build