c:\lib\boost\boost_1_35_0\boost\asio\detail\socket_types.hpp(27) : fatal error C1189: #error : WinSock.h has already been included
я каким-то макаром ее обходил, но теперь хочу разобраться почему она меня преследует... компилю пример работы с libTorrent
#include <iostream>
#include <fstream>
#include <iterator>
#include <exception>
#include <boost/format.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include "libtorrent/entry.hpp"
#include "libtorrent/bencode.hpp"
#include "libtorrent/session.hpp"
int main(int argc, char* argv[])
{
using namespace libtorrent;
#if BOOST_VERSION < 103400
namespace fs = boost::filesystem;
fs::path::default_name_check(fs::no_check);
#endif
if (argc != 2)
{
std::cerr << "usage: ./simple_client torrent-file\n"
"to stop the client, press return.\n";
return 1;
}
try
{
session s;
s.listen_on(std::make_pair(6881, 6889));
std::ifstream in(argv[1], std::ios_base::binary);
in.unsetf(std::ios_base::skipws);
entry e = bdecode(std::istream_iterator<char>(in), std::istream_iterator<char>());
s.add_torrent(torrent_info(e), "./");
// wait for the user to end
char a;
std::cin.unsetf(std::ios_base::skipws);
std::cin >> a;
}
catch (std::exception& e)
{
std::cout << e.what() << "\n";
}
return 0;
}
код взял отсюданеужели у автора тоже была ошибка и он выложил заведомо кривой пример... что-то я сомневаюсь.
Могу предположить что у меня кривой ASIO
но я компилил на этих же инклудах примеры самого асио, некоторые свои исходники... все работает, хотя затык такой всегда был.
обходил шаманством с инклудами... помогите, пожалуйста, определить в чем проблема!
Спасибо!