use '__declspec(dllexport)' to avoid param_xml problem in mingw