$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Christopher Kohlhoff (chris_at_[hidden])
Date: 2006-08-14 22:29:06
Hi Rod,
Rod Morison <rod_at_[hidden]> wrote:
> I'm trying to compile the asio Daytime.3 tutorial source from
> http://asio.sourceforge.net/boost_asio_0_3_7/libs/asio/doc/tutorial/tutdaytime3src.html
> and I'm getting an type error in an arg passed from asio to
> winsock. I'm going to try to grok the code in
> win_iocp_socket_service.hpp to understand the problem, but
> it's my first look at asio internals. (The tutorial builds
> correctly on Linux, not surprising as it's a windows specific
> binding.)
>
> Any help or pointers are appreciated:
>
> cl -c -nologo -EHsc -GR -Zc:forScope -MT
> -I/Boost/include/boost-1_33_1/
> Daytime3-1.cpp -FoDaytime3-1.obj
In short, winsock2.h thinks you're compiling for Win16! The
quick workaround is to add -DWIN32 to your compiler command
line. This has been fixed properly in CVS since asio 0.3.7 was
released. It's also not a problem with Platform SDKs that are
newer than the one included with VC7.1.
Cheers,
Chris