Other's library #define naming conflict

前端 未结 4 1931
忘掉有多难
忘掉有多难 2020-12-03 23:14

Hard to come up with a proper title for this problem. Anyway...

I\'m currently working on a GUI for my games in SDL. I\'ve finished the software drawing and was on m

4条回答
  •  星月不相逢
    2020-12-03 23:54

    It's an unfortunate side effect of #includeing . Assuming you're not actually using Windows' DrawText() anywhere in your program, it's perfectly safe to #undef it immediately after:

    // wherever you #include , or any other windows header
    #include 
    #undef DrawText
    

提交回复
热议问题