Where is WIN32 defined, and how can I include this definition in my project?

后端 未结 6 1009
逝去的感伤
逝去的感伤 2021-01-11 21:06

I am including a third party header and source file into my project.

At the top of the header there is this:

#if defined(WIN32) || defined(WIN16)
#i         


        
6条回答
  •  悲哀的现实
    2021-01-11 21:10

    Some WIN32 defined in the compiler . Just like this,If you use the gcc for windows , WIN32 is defined . If you use the gcc for linux , WIN32 is not defined :)
    So , the macros is a switch. You can define it to use somethine , and not define it to unuse something.

提交回复
热议问题