我在我的項目dlog下面的代碼應該在控制檯中打印值,如果isConsoleLogActive
爲YES。運營商'定義'需要一個標識符ios
它給錯誤,如操作員「定義」需要一個標識符
#if defined ([Util isConsoleLogActive])// Operator 'defined' requires an identifier in this line
#define DLog(...) NSLog(__VA_ARGS__)
#define DTrace() NSLog(@"%s", __PRETTY_FUNCTION__)
#else
#define DLog(...) /* */
#define DTrace() /* */
#endif
,如果我在的.m使用相同的代碼([Util isConsoleLogActive]
)它完美的罰款。我只在#define
這個問題上遇到了什麼問題。請給我一些想法。