title: Mex compilation macro
body: <p>I wish to include a certain header file only when my code is compiled via the mex command in Matlab. If it's compiled directly with Visual Studio I do not want it included.</p>
  
  <p>Is there a macro that can help with that?</p>
  
  <p>I'd like to do something of this sort:</p>
  
  <pre><code>#ifdef MEX_COMPILE_FLAG
  #include "mexDependent.h"
  #end
  </code></pre>