问题出在return std::make_shared<std::fstream>(pathw, mode);这一行,在msvc中fstream是可以接受std::wstring参数的,但是mingw中fstream只接受std::string