On 1 May 2001, at 7:50, someone wrote:
This seems a bit strange. If the duplicate definitions are identical,
(As they should be, if they are actually duplicates) gcc would not
warn, and neither would any other compiler I have tried.
I have found the problem.
In winuser.h the values are defined in decimal notation, and in
imm.h they are defined in hex. This causes cpp to report that the
definitions are different, when they are in fact not. It seems to
compare the string literal, not the actual value. Choosing either
decimal or hex for the definitions will remove the warnings.
> Recent releases of w32api have symbols such as
> defined in both winuser.h and imm.h. Previously these were defined
> only in imm.h. Making the definitions available in winuser.h is more
> compatible with Microsoft headers so is the correct thing to do.
> However, if you are going to use these messages, you will normally
> need access to other definitions in imm.h so must include that as
> well. Then you will see several messages like:
> warning: `WM_IME_STARTCOMPOSITION' redefined
> The solution is to either remove the definitions of these
> symbols from imm.h, or use some #if scheme to make them visible in the
> correct circumstances. There is some #if version checking in the
> Microsoft headers that come with VC++ that I don't understand but they
> do not define any of these messages in imm.h.
> Further, the Microsoft headers do not require an explicit #include
> <imm.h> as it is automatically included by windows.h unless NOIME is