title: boost compile error Mac OS X 10.7.4
body: <p>I want to use boost on my Mac.</p>
  
  <p>Mac OS X 10.7.4
  Xcode 4.5</p>
  
  <p>I installed boost by homebrew.</p>
  
  <pre><code>brew install boost
  </code></pre>
  
  <p>Boost version is 1.49.0.
  And I set up my Xcode project.</p>
  
  <p>Add Header search path.</p>
  
  <pre><code>/usr/local/Cellar/boost/1.49.0/include
  </code></pre>
  
  <p>Add libraries</p>
  
  <pre><code>libboost * .dylib
  </code></pre>
  
  <p>When I compile my project, I have many errors. Clang LLVM 1.0 Error.
  ( I want to upload an image, but I can't upload becase I don't have more than 10 reputation. )</p>
  
  <pre><code>use of undeclared identifier 'nullptr_t'; did you mean 'nullptr'?
  use of undeclared identifier 'nullptr_t'; did you mean 'nullptr'?
  too few template arguments for class template '__is_function'
  use of undeclared identifier 'nullptr_t'; did you mean 'nullptr'?
  field has incomplete type 'std::exception_ptr'
  expected ';' at end of declaration list
  no member named 'memcpy' in namespace 'std::__1'; did you mean 'memcpy'?
  no member named 'memcpy' in namespace 'std::__1'; did you mean 'memcpy'?
  expected ';' at end of declaration list
  expected ';' at end of declaration list
  C++ requires a type specifier for all declarations
  'operator==' cannot be the name of a variable or data member
  use of undeclared identifier 'nullptr_t'; did you mean 'nullptr'?
  expected ';' at end of declaration
  expected unqualified-id
  expected ';' at end of declaration list
  unknown type name 'nullptr_t'
  unknown type name 'nullptr_t'
  qualified reference to 'shared_ptr' is a constructor name rather than a type wherever a constructor can be declared
  too many errors emitted, stopping now
  </code></pre>
  
  <p>I checked this question.</p>
  
  <p><a href="https://stackoverflow.com/questions/12573271/xcode-with-boost-semantic-issue-undeclared-identifier-va-start">XCode with boost &quot;Semantic Issue - undeclared identifier va_start&quot;</a></p>
  
  <p>But I couldn't find answers.
  Please let me know if there is a solution.</p>
  
  <p>The header file using boost is like this.</p>
  
  <p><strong>GLTexture.hpp</strong></p>
  
  <pre><code>#pragma once
  
  #ifndef __GL_TEXTURE_HPP__
  #define __GL_TEXTURE_HPP__
  
  // Standard libraries.
  #include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;string&gt;
  
  #ifdef _WIN32
  #pragma warning (push)
  #pragma warning (disable:4819)
  #endif
  
  // Smart pointers.
  #include &lt;boost/shared_ptr.hpp&gt;
  #include &lt;boost/scoped_ptr.hpp&gt;
  #include &lt;boost/shared_array.hpp&gt;
  
  // Foreach macros.
  #include &lt;boost/foreach.hpp&gt;
  
  // Regular expression.
  #include &lt;boost/regex.hpp&gt;
  
  // Image I/O.
  #define png_infopp_NULL (png_infopp)NULL
  #define int_p_NULL (int*)NULL
  #include &lt;boost/gil/gil_all.hpp&gt;
  #include &lt;boost/gil/extension/io/jpeg_io.hpp&gt;
  #include &lt;boost/gil/extension/io/png_io.hpp&gt;
  
  // File operations,
  #include &lt;boost/filesystem.hpp&gt;
  
  // Linear algebra,
  #include &lt;boost/numeric/ublas/vector.hpp&gt;
  #include &lt;boost/numeric/ublas/matrix.hpp&gt;
  #include &lt;boost/numeric/ublas/io.hpp&gt;
  
  // String functions.
  #include &lt;boost/algorithm/string.hpp&gt;
  
  // Serialization
  #include &lt;boost/serialization/serialization.hpp&gt;
  #include &lt;boost/serialization/string.hpp&gt;
  #include &lt;boost/serialization/vector.hpp&gt;
  #include &lt;boost/archive/xml_iarchive.hpp&gt;
  #include &lt;boost/archive/xml_oarchive.hpp&gt;
  #include &lt;boost/serialization/version.hpp&gt;
  
  #ifdef _WIN32
  #pragma warning (pop)
  #endif
  
  // OpenGL and OpenGL Utility Toolkit
  #ifdef _WIN32
  
  #include &lt;GL/glew.h&gt;
  #include &lt;GL/GLUT.h&gt;
  
  #elif defined __APPLE__
  
  #include &lt;OpenGL/OpenGL.h&gt;
  #include &lt;GLUT/GLUT.h&gt;
  
  
  #endif
  
  #include "TextureManager.hpp"
  #include &lt;time.h&gt;
  
  class TextureManager;
  
  using namespace std;
  
  
  /// function to convert RGB image to RGBA image.
  /// Filling its alpha channel with 255.
  /// This function is called from boost::gil::copy_and_convert_pixels()
  namespace boost { 
      namespace gil {
          template &lt;&gt; void color_convert&lt;rgb8_pixel_t,rgba8_pixel_t&gt;(const rgb8_pixel_t&amp; src,rgba8_pixel_t&amp; dst);
      }
  }
  
  
  class GLTexture
  {
  public:
  
      //Destructor
      ~GLTexture();
  
      //Return instance of GLTexture
      static boost::shared_ptr&lt;GLTexture&gt; getInstance(const std::string&amp; filename, bool _isVolatile = true);
  
      //Load image file and generate texture
      bool LoadFromFile(boost::shared_ptr&lt;GLTexture&gt; texture);
  
      //Bind texture when the texture exists. If the texture doesn't exist, this method generates a texture.
      static void bindTexture(boost::shared_ptr&lt;GLTexture&gt; texture);
  
      //Setter of texFileName
      void setTextureFile(const std::string filename);
      //Setter of volatile Flag
      void setIsVolatile(bool _isVolatile);  
  
      //Getter of texture ID
      inline const GLuint&amp; getTextureID(void)const{
          return this-&gt;texture;
      };
  
      //Overload of operator to sort list
      friend bool operator &lt;(const boost::shared_ptr&lt;GLTexture&gt;&amp; texture1, const boost::shared_ptr&lt;GLTexture&gt;&amp; texture2);
      friend std::ostream&amp; operator &lt;&lt;(ostream&amp; os, const boost::shared_ptr&lt;GLTexture&gt;&amp; texture);
  
  
  
  
  public:
      GLuint texture;             //texture id
      std::string texFileName;    //image file path
      int width;                  //width of image
      int height;                 //height of image
      clock_t start, end;         //start is the timing of bindTexture, end is the timing of delete, these are used to sort list.
      bool isVolatile;            //the flag whether this texture is volatile or not. true is volatile, and false is not volatile. To keep texture, this is false.
      bool isRead;                //the flag whether this texture already exists in texturelist. true means "exists", false means "not exists".
  
      boost::shared_ptr&lt;boost::gil::rgba8_image_t&gt; pixelData_ptr;                     //smart pointer to contain pixelData
      boost::shared_ptr&lt;boost::gil::rgba8_image_t::const_view_t&gt; viewwithAlpha_ptr;   //smart pointer to contain viewData
  
  
  
  
  private:
      //Forbid copy constructor
      GLTexture();
      GLTexture(const std::string&amp; imageFilePath, bool _isVolatile = false);
      GLTexture(const GLTexture&amp; glTexture);
      GLTexture&amp; operator = (const GLTexture&amp; glTexture);
  
      //load image from SSD
      bool LoadImage(const std::string&amp; filename);
  
  
  
  
  };
  
  #endif
  </code></pre>
  
  <p><strong>TextureManager.hpp</strong></p>
  
  <pre><code>#pragma once
  
  #ifndef __TEXTURE_MANAGER_HPP__
  #define __TEXTURE_MANAGER_HPP__
  
  // Standard libraries.
  #include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;string&gt;
  
  #ifdef _WIN32
  #pragma warning (push)
  #pragma warning (disable:4819)
  #endif
  
  // Smart pointers.
  #include &lt;boost/shared_ptr.hpp&gt;
  
  #include &lt;boost/shared_array.hpp&gt;
  
  // Foreach macros.
  #include &lt;boost/foreach.hpp&gt;
  
  // Regular expression.
  #include &lt;boost/regex.hpp&gt;
  
  // Image I/O.
  #define png_infopp_NULL (png_infopp)NULL
  #define int_p_NULL (int*)NULL
  #include &lt;boost/gil/gil_all.hpp&gt;
  #include &lt;boost/gil/extension/io/jpeg_io.hpp&gt;
  #include &lt;boost/gil/extension/io/png_io.hpp&gt;
  
  // File operations,
  #include &lt;boost/filesystem.hpp&gt;
  
  // Linear algebra,
  #include &lt;boost/numeric/ublas/vector.hpp&gt;
  #include &lt;boost/numeric/ublas/matrix.hpp&gt;
  #include &lt;boost/numeric/ublas/io.hpp&gt;
  
  // String functions.
  #include &lt;boost/algorithm/string.hpp&gt;
  
  // Serialization
  #include &lt;boost/serialization/serialization.hpp&gt;
  #include &lt;boost/serialization/string.hpp&gt;
  #include &lt;boost/serialization/vector.hpp&gt;
  #include &lt;boost/archive/xml_iarchive.hpp&gt;
  #include &lt;boost/archive/xml_oarchive.hpp&gt;
  #include &lt;boost/serialization/version.hpp&gt;
  
  #ifdef _WIN32
  #pragma warning (pop)
  #endif
  
  // OpenGL and OpenGL Utility Toolkit
  #ifdef _WIN32
  
  #include &lt;GL/glew.h&gt;
  #include &lt;GL/GLUT.h&gt;
  
  #elif defined __APPLE__
  
  #include &lt;OpenGL/OpenGL.h&gt;
  #include &lt;GLUT/GLUT.h&gt;
  
  
  #endif
  
  #include "GLTexture.hpp"
  
  
  class GLTexture;
  
  class TextureManager
  {
  public:
      TextureManager(void);
      ~TextureManager(void);
  
      //Generate Texture
      static void genTexture(boost::shared_ptr&lt;GLTexture&gt; texture);
  
  
      static void setTexture(const boost::shared_ptr&lt;GLTexture&gt; texture);
  
      static void deleteTexture();
      static bool checkList(const std::string&amp; filename);
  
  
  private:
  
      //Forbid copy constructor
      TextureManager(const TextureManager&amp; texManager);
      TextureManager&amp; operator = (const TextureManager&amp; texManager);  
  
  };
  
  #endif
  </code></pre>