Build uing MinGW


#1

I am trying to build using MinGW, but it runs into some kind of platform issues. It mixes WIN32 and GNU, I think:
…bsf\Source\Foundation\bsfUtility\FileSystem\BsDataStream.cpp:326:56: error: no matching function for call to ‘std::basic_fstream::open(const wchar_t*, std::ios_base::openmode&)’
mFStream->open(path.toPlatformString().c_str(), mode);
C:/mingw-builds/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/fstream:1073:7: note: candidate: ‘void std::basic_fstream<_CharT, _Traits>::open(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits; std::ios_base::openmode = std::_Ios_Openmode]’
open(const char* __s,
^~~~
C:/mingw-builds/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/fstream:1073:7: note: no known conversion for argument 1 from ‘const wchar_t*’ to ‘const char*’
C:/mingw-builds/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/fstream:1094:7: note: candidate: ‘void std::basic_fstream<_CharT, _Traits>::open(const string&, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits; std::__cxx11::string = std::__cxx11::basic_string; std::ios_base::openmode = std::_Ios_Openmode]’
open(const std::string& __s,

So, it looks for const wchar_t*, but only has const char*, or const std::string&.


#2

It’s not supported yet. I’m guessing various platform checks would need to be tweaked in order to compile using mingw. I’d accept a PR if you wanted to make the necessary changes to get it to compile.