LucaDC wrote:
On Windows XP SP3 I get this error while compiling: ... Of course, changing the definition:
myEnhMetaFileProc(HDC /*hDC*/, HANDLETABLE * /*lpHTable*/, ENHMETARECORD const *lpEMFR, int /*nObj*/, LPARAM lpData)
into
myEnhMetaFileProc(HDC /*hDC*/, HANDLETABLE * /*lpHTable*/, ENHMETARECORD *lpEMFR, int /*nObj*/, LPARAM lpData)
(taking away the 'const') fixed the problem but I'm not sure this is what was intended.
Interesting. I just encountered the opposite, and thus added the const, as that also agrees with Microsoft's documentation. Also, I figured that even if this was different in older versions (I'm using TDM's GCC 4.5) it should be safe to hand it a function that takes a const parameter...
I've added a reinterpret_cast to shut gcc up about this (now in bzr). (If anyone has a more elegant solution they're welcome to implement it.)