I am attempting to build an open source project that uses, among other things, wxWidgets.

I can run the project's configure script successfully, but when I try to make I run into the following error

H:/MinGW/msys/1.0/local/include/wx-2.8/wx/msw/private.h: In function 'COLORREF wxColourToRGB(const wxColour&':
H:/MinGW/msys/1.0/local/include/wx-2.8/wx/msw/private.h:219:44: error: cannot convert 'RGB' to 'COLORREF {aka long unsigned int}' in return

The offending function is in wx-2.8/wx/msw/private.h:

inline COLORREF wxColourToRGB(const wxColour& c)
    return RGB(c.Red(), c.Green(), c.Blue());

Looking at the Microsoft documentation webpages I see that RGB is supposed to return precisely a COLORREF. I also found the following in /MinGW/include/wingdi.h

#define RGB(r,g,b) ((COLORREF)((BYTE)(r)|((BYTE)(g) << 8)|((BYTE)(b) << 16)))

Thus I don't understand the compile error.

Does this have something to do with 32 vs 64 bit words? I'm using Win7 64 bit but am using mingw32. Is this a bad idea?

Thank you,