Description
I would like to make Generals buildable using minGW (mingw-w64)
Background:
MinGW is open source project providing cross-platform suite/toolchain to build windows binaries (i.e. toolchain, based on GNU gcc + buinutils + windows headers etc). Can be used on many platforms including windows and linux. So this would make it possible to do build on other systems than window (such as linux, doing cross-compilation), and also drop dependence on proprietary software (for building). This can also serve as good intermediate step to eventual support for other platforms as build target. That would however need much more work and is out of scope of this effort.
Sub goals (many issues already raised by other people):
- fix name case of includes (to allow building on case-sensitive OSes; issue)
- fix encoding errors by making files ascii/utf-8 (issue)
- create replacement code for (VS specific) inline assembly using pure c++ (issue)
- fix GCC build errors by making code portable / standard compliant c++ (without need for VS extensions)
- do changes as necessary to build system (CMake files)
- add GitHub workflows to do build using linux + minGW
Making c++ portable/standard conforming
I have spend some time trying to fix these issues, but I see there is big overlap with ongoing effort to make game compile on VS2022/c++20. I basically faced all the same issues stated in PR as well. There will be more fixes necessary, to fix errors in GCC (like e.g. forward enum declarations etc.). But it will probably be better to wait for VS2022 work to be done, not to duplicate work.