0

I like to read the environment variable in my header file using macros and assign to LOGGING_ENABLED in following code (instate of static value like 1).

#define LOGGING_ENABLED   1

Any way to get environment variable using Macros ?

AAV
  • 3,785
  • 8
  • 32
  • 59
  • 1
    Environment variables are a run-time feature. Macros are a compile-time one. But anyways, iOS applications don't get any additional environment variables set, so I don't understand how/why this is useful... –  Jul 05 '13 at 15:19
  • Edited the question, I like to read the environment variable in my header file using macros. – AAV Jul 05 '13 at 15:24
  • 1
    @AmitVyawahare An environment variable only exists when your app is running. A Macro only exists when your code is being compiled. Never the two shall meet. – bbum Jul 05 '13 at 16:54
  • Thank you for the answers, I think I need to use preprocessor Macros. – AAV Jul 05 '13 at 17:10

0 Answers0