title: MinGW + Boost: undefined reference to `WSAStartup@8'
body: <p>below is what I execute   </p>
  
  <p><code>D:\Just4Fun\software\&gt;make -f Makefile.hands stest<br>
  g++.exe -g -D_WIN32_WINNT=0x0601 -ID:\Boost\boost_1_51_0 -LD:\Boost\boost_1_51_0\stage\lib -LD:\MinGW\lib -lboost_system-mgw46-d-1_51 -lboost_filesystem-mgw46-d-1_51 -lboost_iostreams-mgw46-d-1_51 -lws2_32 -lwsock32 -o TestSerial.exe TestSerial.cpp</code></p>
  
  <p>below is the result of that  </p>
  
  <p><code>C:\Users\oleg\AppData\Local\Temp\ccXpC7RG.o: In function 'ZN5boost4asio6detail17winsock_init_base7startupERNS2_4dataEhh':
  D:/Boost/boost_1_51_0/boost/asio/detail/impl/winsock_init.ipp:39: undefined reference to 'WSAStartup@8'C:\Users\oleg\AppData\Local\Temp\ccXpC7RG.o: In function 'ZN5boost4asio6detail17winsock_init_base7cleanupERNS2_4dataE':
  D:/Boost/boost_1_51_0/boost/asio/detail/impl/winsock_init.ipp:48: undefined reference to 'WSACleanup@0'
  collect2: ld returned 1 exit status
  make: *** [stest] Error 1</code>  </p>
  
  <p>Below is result of checking libraries regarding to mentioned symobls (I failed to format it in appropriate way)</p>
  
  <p>`d:\MinGW\lib>nm -C libws2_32.a | grep WSAStartup<br>
  00000000 T WSAStartup@8<br>
  00000000 I <em>imp</em>_WSAStartup@8</p>
  
  <p>d:\MinGW\lib>nm -C libws2_32.a | grep WSACleanup<br>
  00000000 T WSACleanup@0<br>
  00000000 I <em>imp</em>_WSACleanup@0</p>
  
  <p>d:\MinGW\lib>nm -C libwsock32.a | grep WSACleanup<br>
  00000000 T WSACleanup@0<br>
  00000000 I <em>imp</em>_WSACleanup@0</p>
  
  <p>d:\MinGW\lib>nm -C libwsock32.a | grep WSAStartup<br>
  00000000 T WSAStartup@8<br>
  00000000 I <em>imp</em>_WSAStartup@8`</p>
  
  <p>As wee see symbols are existing in the libraries and libraries are on the place referred by the corresponding -L command line options.<br>
  So, why "undefined refernce"????</p>