-1

我想在代码中添加编译器指令说,如果我们用mingw编译,那么不要考虑这段代码。

例如:

#ifdef _MINGW32_   //if this defined then don't compile the code
int x;
code....
#endif

是否可以?怎么做?

4

1 回答 1

0

你想要...的反义词,(或);这是如此微不足道的基本 C 编码,几乎不值得在这里占有一席之地。#ifdef#ifndef#if ! defined

于 2015-09-17T14:50:56.500 回答