Macro definition at runtime
-
wrote on 25 Aug 2015, 14:05 last edited by
Hi,
I'd like to define macros used in #ifdefs statements at runtime (environment variables) instead of compilation time. Is there a way to do that in Qt?
Thanks
-
Hi and welcome to devnet,
If you want to use environment variables content in your code take a look at qgetenv otherwise no, macros are pre-processed at build time (nothing Qt specific here it's how C/C++ works)
-
wrote on 25 Aug 2015, 14:29 last edited by
-
wrote on 25 Aug 2015, 17:06 last edited by
Thank you guys,
qgetenv worked :)
-
wrote on 25 Aug 2015, 17:15 last edited by
@Jessica you're welcomed. Please don't forget to mark the post as solved.
5/5