title: Boost build error with websocketpp and MySQL on Windows
body: <p>I am trying to build a C++ app that uses both websocketpp and MySQL. I have encountered 2 build problems using VS 2010 C++ Express. </p>
  
  <p>1) A problem with the boost libraries.  It produces many errors like this:</p>
  
  <pre><code> 1&gt;c:\program files (x86)\boost\boost_1_50\boost\thread\win32\thread_data.hpp(210): error C2146: syntax error : missing ')' before identifier 'rel_time'
  </code></pre>
  
  <p>Here's the relevant snippet from thread_data.hpp starting with line 210:</p>
  
  <pre><code>inline BOOST_SYMBOL_VISIBLE void sleep(TimeDuration const&amp; rel_time)
      {
          interruptible_wait(detail::pin_to_zero(rel_time.total_milliseconds()));
      }
  </code></pre>
  
  <p>2) A conflict with the word VERSION which is documented <a href="http://www.experts-exchange.com/Programming/Languages/CPP/Q_28005116.html#a38816882" rel="nofollow">here</a> and I believe is independent.  </p>
  
  <p>To make a clear and simple example of the boost build problems, I'm using the websocketpp example: <a href="https://github.com/zaphoyd/websocketpp/blob/master/examples/echo_server/echo_server.cpp" rel="nofollow">echo_server.cpp</a> to which I added these includes:</p>
  
  <pre><code>#include "stdafx.h" 
  </code></pre>
  
  <p>Boost lib includes recommended by "Building a program with websocketpp" on the websocketpp site.</p>
  
  <pre><code>#include &lt;boost/regex.hpp&gt;
  #include &lt;boost/random.hpp&gt; 
  #include &lt;boost/system/api_config.hpp&gt;
  #include &lt;boost/system/config.hpp&gt;
  #include &lt;boost/system/error_code.hpp&gt;
  #include &lt;boost/system/system_error.hpp&gt;
  #include &lt;boost/system/windows_error.hpp&gt;
  </code></pre>
  
  <p>and the MySQL header includes.  Adding these 2 boostincludes triggers the build errors.  If I comment out these 2 includes, it builds without errors:</p>
  
  <pre><code>#include &lt;my_global.h&gt;
  #include &lt;mysql.h&gt;
  </code></pre>
  
  <p>Any suggestions on how to deal with the boost problems?</p>
  
  <p>I don't think this is the same build problem as this one, "Trying to build websocket++ with MinGW: last few linker errors — what could it be?"</p>