title: #ifdef not accepting enum definition
body: <p>I'm currently developing a project which involves 7 files: <code>main.cpp</code>, <code>GpioInterface.h</code>, <code>GpioInterface.cpp</code>, <code>Utility.h</code> and <code>Utility.cpp</code>. </p>
  
  <p>Basically in the <code>main.cpp</code> file I declare the board type using <code>#define BOARD_TYPE WHATEVER</code> and then in <code>GpioInterface.h</code> I define some values if this macro has been defined.</p>
  
  <p>It looks something like this:</p>
  
  <p>main.cpp:</p>
  
  <pre><code>#define __USE_BOARD_ WHATEVER // This should go in an external file in the future
  #ifdef __USE_BOARD_
      // Define some stuff
  #endif
  
  #include "GpioInterface.h"
  #include "Utility.h"
  
  // main function here
  </code></pre>
  
  <p>GpioInterface.h:</p>
  
  <pre><code>#ifndef GPIO_INTERFACE_H
  #define GPIO_INTERFACE_H
  
  #include &lt;stdint.h&gt;
  #include &lt;stdio.h&gt;
  
  #ifdef __USE_BOARD_
  
  enum GPIO_PIN_MODE {
      GPIO_PIN_MODE_OUTPUT = 0x00,
      GPIO_PIN_MODE_INPUT = 0x01,
  };
  
  enum GPIO_PIN_STATE {
      GPIO_PIN_STATE_LOW = 0x00,
      GPIO_PIN_STATE_HIGH = 0x01,
  };
  
  #endif // __USE_BOARD_
  // some other stuff
  #endif // GPIO_INTERFACE_H
  </code></pre>
  
  <p>Utility.cpp:</p>
  
  <pre><code>#include "Utility.h"
  #include "GpioInterface.h"
  
  void someFunction() {
      GPIO_digitalWrite(2, GPIO_PIN_STATE_HIGH); // Write HIGH in pin 2
  }
  </code></pre>
  
  <p>When compiling, the <code>GpioInterface.h</code> file is giving me the following error <code>'GPIO_PIN_STATE_HIGH' was not declared in this scope</code>.</p>
  
  <p>Any idea how to make the enums defined in <code>GpioInterface.h</code> visible to <code>Utility.cpp</code>?</p>
  
  <p>Thanks!</p>