title: Box2D Emscripten: what is box2d.clean.h, and how to successfully generate it?
body: <p>I am likely missing something simple but I can't really figure it out. </p>
  
  <p>This is from <a href="https://github.com/kripken/box2d.js/blob/master/Makefile" rel="nofollow">the makefile</a>: </p>
  
  <pre><code>box2d.clean.h:
      cpp -x c++ -DEM_NO_LIBCPP -IBox2D_v2.2.1 root.h &gt; box2d.clean.h
  </code></pre>
  
  <p>Let's take a look at <a href="https://github.com/kripken/box2d.js/blob/master/root.h" rel="nofollow">root.h</a>:</p>
  
  <pre><code>// Prevent some inclusions
  #define NDEBUG
  
  #ifdef EM_NO_LIBCPP
  #define _FEATURES_H
  #define _GLIBCXX_CMATH
  #define _GLIBCXX_CXX_CONFIG_H
  #define _CPP_TYPE_TRAITS_H
  #define _EXT_TYPE_TRAITS
  #define _GLIBCXX_NUMERIC_LIMITS
  #define __GNUC_PREREQ(x, y) 0
  #define _STL_RELOPS_H
  #define _STL_PAIR_H
  #define _FUNCTEXCEPT_H
  #define _EXT_NUMERIC_TRAITS
  #define _STL_ITERATOR_BASE_TYPES_H
  #define _STL_ITERATOR_H
  #endif
  
  #include &lt;Box2D/Box2D.h&gt;
  </code></pre>
  
  <p>Okay. Yes I see that we are preventing the inclusion of several headers by defining their include guards. Headers like <code>&lt;Features.h&gt;</code>. </p>
  
  <p>My questions: </p>
  
  <p>What purpose might preventing the inclusion of these headers serve? </p>
  
  <p>What command should <code>cpp</code> be aliased to? On my machine I see this output: </p>
  
  <pre><code>cpp -x c++ -DEM_NO_LIBCPP -IBox2D_v2.2.1 root.h &gt; box2d.clean.h
  i686-apple-darwin11-llvm-gcc-4.2: c: No such file or directory
  i686-apple-darwin11-llvm-gcc-4.2: c++: No such file or directory
  i686-apple-darwin11-llvm-gcc-4.2: warning: '-x -x' after last input file has no effect
  i686-apple-darwin11-llvm-gcc-4.2: no input files
  </code></pre>
  
  <p>Why would <code>gcc</code> be looking for <code>c</code>? </p>