extra text after expected end of preprocessing directive

  • Post author:
  • Post category:其他


原代码:


#ifdef defined (ENABLE)

**********

#elif defined (ENABLE)

**********

#endif

会有警告Warning:  #14-D: extra text after expected end of preprocessing directive发生,意思是预期预处理指令是在#ifdef后就要结束的,属于预处理用法产生的问题

改为:


#if defined (ENABLE)

**********

#elif defined (ENABLE)

**********

#endif

正确用法:

#ifdef (ENABLE)

#else

#endif

或者

#if defined (ENBALE)

#elif defined (ENABLE)

#endif



版权声明:本文为QX_a11原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。