title: Defined macro not recognized
body: <p>I have the following code in my Eclipse project</p>
  
  <pre><code>#pragma once
  
  #ifdef WIN32 // Compiler enters here !
      #define M_PI 3.14159265358979323846
  #else
      #include &lt;cmath&gt;
  #endif
  
  #ifndef INFINITY
      #define INFINITY FLT_MAX
  #endif
  
  inline float Radians(float deg)
  {
      return ((float)M_PI/180.f) * deg;
  }
  </code></pre>
  
  <p>Problem is that I'm getting the following error from the compiler</p>
  
  <pre><code>Luzoso.hpp:22:20: error: 'M_PI' was not declared in this scope
       return ((float)M_PI/180.f) * deg;
  </code></pre>
  
  <p>I don't understand what the problem might be. I built the project with CMake using <code>ECLIPSE CDT4 - MinGW Makefiles</code> as the generator. Any advise?</p>