On 2016-10-07 10:19, Tommaso Fabbri wrote:
I have a Windows 10 system running the latest version of Cygwin 64 bit.
I’ve installed all the Boost libraries and cmake, make packages to develop
under Windows like on *nix systems.
When I try to compile a simple application including the boost-asio library
like the following, it fails.
#include <boost/asio.hpp>
int main(int argc, char**argv)
{
return 0;
}
WFM, but then again you didn't tell us *how* were trying to compile it
until...
I report the stackoverflow discussion link:
http://stackoverflow.com/questions/39894006/how-to-use-boost-asio-library-with-cygwin-64-bit
Which shows you're making several mistakes:
* -std=c++11; use -std=gnu++11 instead;
* -D__USE_W32_SOCKETS; winsock cannot be combined with Cygwin's *NIX
socket APIs, so do NOT define this. If you want a pure Windows build of
this code without the Cygwin dependency, then use mingw64-*-boost with
the mingw64 toolchains (and also link with -lws2_32);
* not linking with -lboost_system;
* attempting to get authoritative answers outside of this list.
--
Yaakov