I solved it. I tried with the old MingW32 but it wasn't working. Also with TDM-GCC 64 it wasn't working, even though it did compile with what I'm about to share, compiling a project in Debug mode later (with TDM) would have cc1plus.exe to crash (heap problem perhaps?). Anyway, here is what I do to make it compile in Monolithic, using the MingW64 compiler (and adding to PATH this C:\MingW64\bin)
I created a batch file, in order to have the PATH as local and singled out for the compile process and not have any other paths interference. The batch file contains the following (its got 3 user arguments described below):
Code: Select all
@echo off
setlocal
set PATH=C:\MingW64\bin;C:\MingW64\x86_64-w64-mingw32\bin;C:\MingW64\libexec\gcc\x86_64-w64-mingw32\6.3.0
mingw32-make -f makefile.gcc SHARED=0 BUILD=%1 UNICODE=1 MONOLITHIC=%2 CXXFLAGS="-D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -fno-keep-inline-dllexport -std=gnu++11 -static-libgcc -static-libstdc++" %3
endlocal
the user arguments are:
1) 'release' or 'debug' (without the quotes)
2) 1 or 0 (if user wants monolithic or not)
3) empty, or 'clean' to allow for sweeping the dust just in case
Notice the _WIN32_WINNT and WINVER variables both set to 0x0A00. This is the value for Windows 10.
It compiles both for Release and Debug in Monolithic.
The only issue was if using TDM-GCC 64, even though wxWidgets was compiling with the above method (adapting the path for tdm), when I was creating a wxwidgets GUI project in Code-Blocks, with the "pre-compiled header" option, the Debug version was crashing during compile saying the cc1plus.exe has stopped working. If I'd create a project without the pre-compiled header option, then both Release and Debug would compile and run fully. But you want the pre-compile header eventually, because your project always grows and the compile process would take forever (if precompile header is not used). Doing little research, it appears that TDM-GCC 64 is not quite ready for large heap memory or something along those lines. Until then, looks like MingW64 works for me.