Macros for GCC/G++ to differentiate Linux and Mac OSX?

后端 未结 4 573
独厮守ぢ
独厮守ぢ 2020-12-22 23:03

Macros for GCC/G++ to differentiate Linux and Mac OSX?

4条回答
  •  我在风中等你
    2020-12-22 23:32

    I'd be more inclined to test for feature availability than platform name. Try using autoconf.

    Otherwise, this is a comprehensive list of platform defines.

    Also check out this page for defines regarding compilers, libraries, architectures and devices.

提交回复
热议问题