GNUstep如何调试条件开关
这篇文章主要介绍GNUstep如何调试条件开关,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!
#include "say.h" #include <Foundation/Foundation.h> int main(void) { id speaker; NSString *name = @"GNUstep !"; NSAutoreleasePool *pool; pool = [NSAutoreleasePool new]; speaker = [[Say alloc] init]; [speaker sayHello]; [speaker sayHelloTo: name]; RELEASE(speaker); RELEASE(pool); #ifdef DEBUG NSLog(@"%@\n", @"Debug Now"); #endif return 0; }
其中,
#ifdef DEBUG
NSLog(@"%@\n", @"Debug Now");
#endif
为调试开关
make debug=yes打开
缺省make,debug为no
使用示例:
以上是“GNUstep如何调试条件开关”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注行业资讯频道!