I tried to compile wxwidgets 3.1.1 with MinGW 8.1, in 32 bits (with i686-8.1.0-release-posix-sjlj-rt_v6-rev0) or 64 bits (with x86_64-8.1.0-release-posix-seh-rt_v6-rev0) without success.
Many wanings (warning: cast between incompatible function types from 'wxLongToLongHashMap_wxImplementation_HashTable::size_type (*)...) and finally errors (invalid static_cast from type 'long long unsigned int' to type 'HANDLE' {aka 'void*'}).
Some of the users seem to compile without problems wxwidgets 3.1.1 with this 8.1 version. Could you tell me the command line you have used ?
I have : mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS="-fpermissive -fno-keep-inline-dllexport -std=gnu++11 -Wno-deprecated-declarations".
It works for me with MinGW 4.9 -> 7.3.
gd_on