This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: Cygwin 2.876 64bit - Boost 1.60 asio does not compile
- From: Yaakov Selkowitz <yselkowitz at cygwin dot com>
- To: cygwin-apps at cygwin dot com
- Date: Fri, 7 Oct 2016 17:55:29 -0500
- Subject: Re: Cygwin 2.876 64bit - Boost 1.60 asio does not compile
- Authentication-results: sourceware.org; auth=none
- References: <00f501d220ae$29998150$7ccc83f0$@yahoo.com>
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