[Solved]Where does Qt define the __VA_ARGS__ macro ?
-
Your compiler needs to support variadic macros. Qt can not make them work for you.
-
Tobias, you are right. The compiler, i.e. gcc, comes with the platform, not with the Qt. Thank you very much.
I am using Mac OS X. I tried <stdio.h> and <stdarg.h>, no luck yet. Any one can tell me which header defines this "VA_ARGS" macro?
Thanks,
Stuart
-
It turns out that I mistakenly try to use this "VA_ARGS" in a function directly.
I examined that both of the following format work in Qt program:
@#define LOG(fmt, ...) dbg_func(fmt, ##VA_ARGS)
#define LOG(fmt, args...) dbg_func(fmt, ##args)@Sorry for the annoying.