#56 windows.h incompatability

closed-invalid
nobody
None
5
2007-08-18
2007-08-17
No

It seems #include <windows.h> and #include "curses.h" doesn't work simultaneously.

GCC issues a warning that MOUSE_MOVED is already defined:

[165] #define MOUSE_MOVED (Mouse_status.changes & PDC_MOUSE_MOVED)

Is there a fix for this that doesn't break portability?

Discussion

  • William McBrine

    William McBrine - 2007-08-18
    • status: open --> pending-invalid
     
  • William McBrine

    William McBrine - 2007-08-18

    Logged In: YES
    user_id=27933
    Originator: NO

    #include <windows.h>
    #undef MOUSE_MOVED
    #include <curses.h>

    or

    #include <curses.h>
    #undef MOUSE_MOVED
    #include <windows.h>

    depending on which, if either, MOUSE_MOVED symbol you actually intend to reference. As for portability, I'm not sure what you mean -- windows.h is Windows-specific.

    This is not a bug, so I'm marking it invalid.

     
  • William McBrine

    William McBrine - 2007-08-18

    Logged In: YES
    user_id=27933
    Originator: NO

    After I wrote that, it occurred to me that you probably meant "Is there a way to modify curses.h to make it compatible with windows.h that doesn't break portability?".

    Sorry, I won't be modifying curses.h for the sake of windows.h.

     
  • William McBrine

    William McBrine - 2007-08-18
    • status: pending-invalid --> closed-invalid
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks