thanks for the response, yes i understand where is the problem but i dont understand where to put the headers.
I use only the client-test.cpp and the needed for it header and other cpp files in my project.
I tried so far to use them on the byteswap.hpp that gets the error and also in the client_test.cpp
but nothing actually worked.
i would like to know if is possible where should i give the tries in which cpp hpp or where to play around with the order
of the definitions cause there are too many cpp hpp files and even redefinition errors.
Does anyone have a clue about it ?
If i change boost version also could it be of a help or it doesnt matter the version ?
________________________________
From: Arvid Norberg <***@gmail.com>
Sent: Monday, May 15, 2017 2:23:07 AM
To: General discussion about libtorrent
Subject: Re: [libtorrent] How to overpass winsock2.h error in byteswap.hpp
I've come across this issue a few times on windows too. iirc, there are
cases where you must include windows.h before certain boost/asio headers.
On Sun, May 14, 2017 at 2:13 PM, Nocs ... <***@hotmail.com> wrote:
> Here is my errors in the below link
>
> <https://gist.github.com/nocos/dbb3ed6bd76877f21f1cdac75a6b67d3.js>
> https://gist.github.com/nocos/dbb3ed6bd76877f21f1cdac75a6b67d3
>
> <https://gist.github.com/nocos/dbb3ed6bd76877f21f1cdac75a6b67d3.js>
> <https://gist.github.com/nocos/dbb3ed6bd76877f21f1cdac75a6b67d3>
>
> <https://gist.github.com/nocos/dbb3ed6bd76877f21f1cdac75a6b67d3.js><
> https://gist.github.com/nocos/dbb3ed6bd76877f21f1cdac75a6b67d3>
>
> ________________________________
> From: Nocs ... <***@hotmail.com>
> Sent: Sunday, May 14, 2017 9:05:39 PM
> To: libtorrent-***@lists.sourceforge.net
> Subject: [libtorrent] How to overpass winsock2.h error in byteswap.hpp
>
> Hi again, i ve managed to build it without errors and use the appropiate
> client_test to start testing
>
> but i cant build cause of the ntohs ntohl htons htonl error i get refering
> to winsock2.h
>
>
> I tried many options about winsock2.h ws2tcpip.h windows.h solutions but
> nothing came in handy
>
> do i need to define anything ?
>
> i allready tried WIN32_LEAN_AND_MEAN defined first before all in the
> client_test.cpp
>
> and also _WINSOCKAPI_ but nothing seems to work
>
> i am on msvc2013 and build the latest version from rasterbar
>
>
> does anyone knows what to change and where so i can make it work ?
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Libtorrent-discuss mailing list
> Libtorrent-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Libtorrent-discuss mailing list
> Libtorrent-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
>
--
Arvid Norberg
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Libtorrent-discuss mailing list
Libtorrent-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss