title: How to compile thrift in Windows? I got errors
body: <p>I trying to compile x64 version of thrift in Visual Studio 2012.<br>
  I successfully compiled it's dependency, libevent (cmake with VS 11 Win64 code generator).<br>
  As for boost I used precompiled binary boost_1_55_0-msvc-11.0-64.exe (version 1.55.0_build2, Visual C++ 2012 x64 compiler).<br>
  Then I changed C++ folder in project settings:<br>
  Include folders:  </p>
  
  <ol>
  <li>$(ProjectDir)\src\</li>
  <li>$(ProjectDir)\src\thrift\windows\</li>
  <li>c:\local\boost_1_55_0\</li>
  <li>c:\OpenSSL-Win64\include\</li>
  </ol>
  
  <p>Libraries folders:  </p>
  
  <ol>
  <li>c:\local\boost_1_55_0\lib64-msvc-11.0\</li>
  <li>c:\source\Libevent-master\build64\lib\Debug\</li>
  <li>c:\OpenSSL-Win64\lib\</li>
  </ol>
  
  <p>Then after I start compilation project libthrift (inside lib\cpp\ subfolder) I got following output:</p>
  
  <pre><code>1&gt;------ Build started: Project: libthrift, Configuration: Debug x64 ------
  1&gt;  WinFcntl.cpp
  1&gt;  TWinsockSingleton.cpp
  1&gt;  SocketPair.cpp
  1&gt;  GetTimeOfDay.cpp
  1&gt;  TTransportUtils.cpp
  1&gt;  TTransportException.cpp
  1&gt;  TSocket.cpp
  1&gt;  TSimpleFileTransport.cpp
  1&gt;  TServerSocket.cpp
  1&gt;  TPipeServer.cpp
  1&gt;  TPipe.cpp
  1&gt;  THttpTransport.cpp
  1&gt;  THttpServer.cpp
  1&gt;src\thrift\transport\THttpServer.cpp(95): warning C4267: 'argument' : conversion from 'size_t' to 'uint32_t', possible loss of data
  1&gt;  THttpClient.cpp
  1&gt;  TFileTransport.cpp
  1&gt;  TFDTransport.cpp
  1&gt;  TBufferTransports.cpp
  1&gt;  Thrift.cpp
  1&gt;  TApplicationException.cpp
  1&gt;  TThreadPoolServer.cpp
  1&gt;  Generating Code...
  1&gt;  Compiling...
  1&gt;  TSimpleServer.cpp
  1&gt;  TJSONProtocol.cpp
  1&gt;  TDenseProtocol.cpp
  1&gt;  TDebugProtocol.cpp
  1&gt;  TBase64Utils.cpp
  1&gt;  PeekProcessor.cpp
  1&gt;c:\local\boost_1_55_0\boost/smart_ptr/shared_ptr.hpp(653): error C2668: '_wassert' : ambiguous call to overloaded function
  1&gt;          C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\assert.h(28): could be 'void _wassert(const wchar_t *,const wchar_t *,unsigned int)'
  1&gt;          C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\assert.h(28): or       'void apache::thrift::protocol::_wassert(const wchar_t *,const wchar_t *,unsigned int)'
  1&gt;          while trying to match the argument list '(const wchar_t [8], const wchar_t [53], int)'
  1&gt;          c:\local\boost_1_55_0\boost/smart_ptr/shared_ptr.hpp(652) : while compiling class template member function 'apache::thrift::transport::TTransport *boost::shared_ptr&lt;T&gt;::operator -&gt;(void) const'
  1&gt;          with
  1&gt;          [
  1&gt;              T=apache::thrift::transport::TTransport
  1&gt;          ]
  1&gt;          D:\Downloads\chrome\!source\thrift-0.9.1\lib\cpp\src\thrift/transport/TBufferTransports.h(231) : see reference to function template instantiation 'apache::thrift::transport::TTransport *boost::shared_ptr&lt;T&gt;::operator -&gt;(void) const' being compiled
  1&gt;          with
  1&gt;          [
  1&gt;              T=apache::thrift::transport::TTransport
  1&gt;          ]
  1&gt;          D:\Downloads\chrome\!source\thrift-0.9.1\lib\cpp\src\thrift/transport/TTransport.h(262) : see reference to class template instantiation 'boost::shared_ptr&lt;T&gt;' being compiled
  1&gt;          with
  1&gt;          [
  1&gt;              T=apache::thrift::transport::TTransport
  1&gt;          ]
  1&gt;  Util.cpp
  1&gt;  TimerManager.cpp
  1&gt;  ThreadManager.cpp
  1&gt;  BoostThreadFactory.cpp
  1&gt;src\thrift\concurrency\BoostThreadFactory.cpp(101): error C2664: 'std::thread::id::id(const std::thread &amp;)' : cannot convert parameter 1 from 'boost::thread::id' to 'const std::thread &amp;'
  1&gt;          Reason: cannot convert from 'boost::thread::id' to 'const std::thread'
  1&gt;          No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
  1&gt;src\thrift\concurrency\BoostThreadFactory.cpp(165): error C2664: 'std::thread::id::id(const std::thread &amp;)' : cannot convert parameter 1 from 'boost::thread::id' to 'const std::thread &amp;'
  1&gt;          Reason: cannot convert from 'boost::thread::id' to 'const std::thread'
  1&gt;          No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
  1&gt;  BoostMutex.cpp
  1&gt;  BoostMonitor.cpp
  1&gt;  TAsyncChannel.cpp
  1&gt;  Generating Code...
  </code></pre>
  
  <p>First error says that while processing PeekProcessor.cpp there two ambiguous calls of _wassert function. _wassert contructed from BOOST_ASSERT macro inside boost' shared_ptr arrow operator. Second signature "<strong>void apache::thrift::protocol::_wassert(const wchar_t *,const wchar_t *,unsigned int)</strong>" looks like shared_ptr.h was included inside apache::thrift::protocol but I could not find where.<br>
  <strong>Can someone suggest how to correct this error?</strong></p>
  
  <p><strong>Can someone tell what is two last errors and how to correct them?</strong></p>