title: How to use Boost.Asio on Visual Studio 2005 - Windows Xp?
body: <p>I have to use the library Boost.asio in C + + Visual Studio 2005 (Windows XP).</p>
  
  <p>I followed these steps:
  - I downloaded the executable file. exe to install the Boost libraries on Windows XP in my file path.</p>
  
  <ul>
  <li><p>I set the environment variable INCLUDE : W:\boost_1_46_1 (my path file where there are the libraries)</p></li>
  <li><p>in Visual Studio 2005 in the properties of my project (VS->tools->Options project&amp;solutions->vcc++directories) I added $ (INCLUDE)</p></li>
  <li><p>in the properties of my project in visual studio, I added the path of my libraries to the linker to compile my example.</p></li>
  <li><p>I tried to compile the sample files: <a href="http://www.boost.org/doc/libs/1_46_1/doc/html/boost_asio/example/multicast/sender.cpp" rel="nofollow">http://www.boost.org/doc/libs/1_46_1/doc/html/boost_asio/example/multicast/sender.cpp</a></p></li>
  <li><p>I have several errors at compilation time:</p></li>
  </ul>
  
  <p>Error 3 error C2653: 'asio' : is not a class or namespace name c:\Documents and Settings\GG\Desktop\sender.cpp 2</p>
  
  <p>Error 4 error C2653: 'asio' : is not a class or namespace name c:\Documents and Settings\GG\Desktop\sender.cpp 24</p>
  
  <p>Error 5 error C2143: syntax error : missing ')' before '&amp;' c:\Documents and Settings\GG\Desktop\sender.cpp 24</p>
  
  <p>Error 6 error C2143: syntax error : missing ';' before '&amp;' c:\Documents and Settings\GG\Desktop\sender.cpp 24</p>
  
  <p>Error 7 error C2460: 'sender::io_service' : uses 'sender', which is being defined c:\Documents and Settings\GG\Desktop\sender.cpp 24</p>
  
  <p>Error 8 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\Documents and Settings\GG\Desktop\sender.cpp 24</p>
  
  <p>Error 9 error C2653: 'asio' : is not a class or namespace name c:\Documents and Settings\GG\Desktop\sender.cpp 24</p>
  
  <p>Error 10 error C2143: syntax error : missing ';' before '&amp;' c:\Documents and Settings\GG\Desktop\sender.cpp 24</p>
  
  <p>Error 11 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\Documents and Settings\GG\Desktop\sender.cpp 24</p>
  
  <p>Error 13 error C2059: syntax error : ')' c:\Documents and Settings\GG\Desktop\sender.cpp 24</p>
  
  <p>Error 14 error C2065: 'multicast_address' : undeclared identifier c:\Documents and Settings\GG\Desktop\sender.cpp 26</p>
  
  <p>Error 15 error C3861: 'endpoint_': identifier not found c:\Documents and Settings\GG\Desktop\sender.cpp 26</p>
  
  <p>Error 16 error C2531: 'sender::multicast_address' : reference to a bit field illegal c:\Documents and Settings\GG\Desktop\sender.cpp 26</p>
  
  <p>Error 17 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\Documents and Settings\GG\Desktop\sender.cpp 26</p>
  
  <p>Error 18 error C2327: 'sender::io_service' : is not a type name, static, or enumerator c:\Documents and Settings\GG\Desktop\sender.cpp 27</p>
  
  <p>Error 19 error C2061: syntax error : identifier 'io_service' c:\Documents and Settings\GG\Desktop\sender.cpp 27</p>
  
  <p>Error 20 error C2059: syntax error : ')' c:\Documents and Settings\GG\Desktop\sender.cpp 27</p>
  
  <p>Error 21 error C2061: syntax error : identifier 'timer_' c:\Documents and Settings\GG\Desktop\sender.cpp 28</p>
  
  <p>Error 22 error C2143: syntax error : missing ')' before '{' c:\Documents and Settings\GG\Desktop\sender.cpp 30</p>
  
  <p>Error 23 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\Documents and Settings\GG\Desktop\sender.cpp 30</p>
  
  <p>Error 24 error C2143: syntax error : missing ';' before '{' c:\Documents and Settings\GG\Desktop\sender.cpp 39</p>
  
  <p>Error 25 error C2334: unexpected token(s) preceding '{'; skipping apparent function body c:\Documents and Settings\GG\Desktop\sender.cpp 39</p>
  
  <p>Error 26 fatal error C1004: unexpected end-of-file found c:\Documents and Settings\GG\Desktop\sender.cpp 100</p>
  
  <p>I miss some step?
  Thanks</p>
  
  <hr>
  
  <p>Now, i have added in the sample file sender.cpp this:</p>
  
  <pre><code>#using namespace boost;
  </code></pre>
  
  <p>now the errors are reduced as follows:</p>
  
  <p>Error 3 error C2039: 'error_code' : is not a member of 'boost::asio' c:\Documents and Settings\GG\Desktop\sender.cpp 42</p>
  
  <p>Error 4 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\Documents and Settings\GG\Desktop\sender.cpp 42</p>
  
  <p>Error 5 error C2143: syntax error : missing ',' before '&amp;' c:\Documents and Settings\GG\Desktop\sender.cpp 42</p>
  
  <p>Error 6 error C2039: 'error_code' : is not a member of 'boost::asio' c:\Documents and Settings\GG\Desktop\sender.cpp 53</p>
  
  <p>Error 7 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\Documents and Settings\GG\Desktop\sender.cpp 53</p>
  
  <p>Error 8 error C2143: syntax error : missing ',' before '&amp;' c:\Documents and Settings\GG\Desktop\sender.cpp 53</p>
  
  <p>Error 9 error C2065: 'error' : undeclared identifier c:\Documents and Settings\GG\Desktop\sender.cpp 44</p>