> The simplest way is to remove or comment out that #undef and try
> building.  Whatever problems related to RGB that pop up will be the
> clue.

There is a redefinition of RGB as a three byte struct in the source. The problem is that if the #undef RGB happens before certain wxWidgets headers include Windows headers, the type that the Windows headers expect for RGB is just wrong.

I just recursively replaced RGB->RGB3 in all of the source files. That fixed it.

Thank you, everyone, for your help.

P.S. Recursively search/replacing text in a Windows file tree is apparently such an obscure task that I had to write a python script to do it. Really? I guess this is why we have msys.