Macro definition at runtime
-
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)
-
-
Thank you guys,
qgetenv worked :)
-
@Jessica you're welcomed. Please don't forget to mark the post as solved.