I am building a C program on macOS and I'd like to cross-compile it for Windows. I'd use clang (which works well for macOS and Linux builds) and mingw (x86_64-w64-mingw32-gcc) for Windows builds. However mate.h hardcodes the names for these commands as seen below:
String CompilerToStr(Compiler c) {
switch (c) {
case GCC: return S("gcc");
case CLANG: return S("clang");
case TCC: return S("tcc");
case MSVC: return S("cl.exe");
}
}
So I am stuck symlinking gcc to x86_64-w64-mingw32-gcc and adding that to path if I want to compile for Windows. Is there a better way I am missing?
Additionally, because of my requirements I almost need Mate's rebuilding functionality and the executable's building functionality to have completely separate compiler configurations.
I am building a C program on macOS and I'd like to cross-compile it for Windows. I'd use
clang(which works well for macOS and Linux builds) and mingw (x86_64-w64-mingw32-gcc) for Windows builds. However mate.h hardcodes the names for these commands as seen below:So I am stuck symlinking gcc to
x86_64-w64-mingw32-gccand adding that to path if I want to compile for Windows. Is there a better way I am missing?Additionally, because of my requirements I almost need Mate's rebuilding functionality and the executable's building functionality to have completely separate compiler configurations.