[asio][msvc-8_0] compilation failed on example
Hi, I've been trying to use Boost.Asio in a project and compilation failed with VC 8.0. Compiler complains that unary operator! that should be member of asio::error is not defined. I tried to compile lib/asio/example/http/client/ from CVS HEAD and got another compile issue: ..\..\..\..\..\boost/asio/ip/unicast.hpp(62) : error C2065: 'IPV6_UNICAST_HOPS': undeclared identifier Is there known compile issue with asio? Thanks for your help. JD
JD writes:
I've been trying to use Boost.Asio in a project and compilation failed with VC 8.0. Compiler complains that unary operator! that should be member of asio::error is not defined.
The error handling classes have changed. See this post: http://article.gmane.org/gmane.comp.lib.boost.devel/150573
I tried to compile lib/asio/example/http/client/ from CVS HEAD and got another compile issue:
..\..\..\..\..\boost/asio/ip/unicast.hpp(62) : error C2065: 'IPV6_UNICAST_HOPS': undeclared identifier
Is there known compile issue with asio? Thanks for your help.
It sounds like you have a very old platform sdk or something on your include path. This should be defined for you in ws2tcpip.h. Cheers, Chris
Christopher Kohlhoff wrote:
JD writes:
I've been trying to use Boost.Asio in a project and compilation failed with VC 8.0. Compiler complains that unary operator! that should be member of asio::error is not defined.
The error handling classes have changed. See this post:
It seems that the example has not been updated accordingly: still use !err.
I tried to compile lib/asio/example/http/client/ from CVS HEAD and got another compile issue:
..\..\..\..\..\boost/asio/ip/unicast.hpp(62) : error C2065: 'IPV6_UNICAST_HOPS': undeclared identifier
Is there known compile issue with asio? Thanks for your help.
It sounds like you have a very old platform sdk or something on your include path. This should be defined for you in ws2tcpip.h.
Well IPV6_UNICAST_HOPS is defined in my ws2tcpip.h. I'm using WinXP SP1 SDK. And my include path is pretty simple: boost only... Thanks anyway. JD
JD
It seems that the example has not been updated accordingly: still use !err.
No, it's correct. That particular use of asio::error has been replaced with boost::system::error_code, and that class supports operator!.
Well IPV6_UNICAST_HOPS is defined in my ws2tcpip.h. I'm using WinXP SP1 SDK. And my include path is pretty simple: boost only...
Unfortunately I can't tell what's going on from here, but it really looks to me like it's picking up an old ws2tcpip.h header from somewhere else. Asio includes that header from asio/detail/socket_types.hpp. Cheers, Chris
Christopher Kohlhoff wrote:
JD
writes: It seems that the example has not been updated accordingly: still use !err.
No, it's correct. That particular use of asio::error has been replaced with boost::system::error_code, and that class supports operator!.
Ok, I was mixing version of asio and didn't notice the changes between the two example files.
Well IPV6_UNICAST_HOPS is defined in my ws2tcpip.h. I'm using WinXP SP1 SDK. And my include path is pretty simple: boost only...
Unfortunately I can't tell what's going on from here, but it really looks to me like it's picking up an old ws2tcpip.h header from somewhere else. Asio includes that header from asio/detail/socket_types.hpp.
There is two versions of this file on my system and the other one (part of cygwin) in definitely not included in my path. Moreover I was compiling the example using the Jamfile provided so... I'll dig this if I have some time and keep you posted if I found out what's going on. Thanks for your precious help. JD
Christopher Kohlhoff wrote:
JD
writes: It seems that the example has not been updated accordingly: still use !err.
No, it's correct. That particular use of asio::error has been replaced with boost::system::error_code, and that class supports operator!.
Ok, I was mixing version of asio and didn't notice the changes between the two example files.
Well IPV6_UNICAST_HOPS is defined in my ws2tcpip.h. I'm using WinXP SP1 SDK. And my include path is pretty simple: boost only...
Unfortunately I can't tell what's going on from here, but it really looks to me like it's picking up an old ws2tcpip.h header from somewhere else. Asio includes that header from asio/detail/socket_types.hpp.
There is two versions of this file on my system and the other one (part of cygwin) in definitely not included in my path. Moreover I was compiling the example using the Jamfile provided so... I'll dig this if I have some time and keep you posted if I found out what's going on. Thanks for your precious help. JD
Christopher Kohlhoff wrote:
JD
writes: It seems that the example has not been updated accordingly: still use !err.
No, it's correct. That particular use of asio::error has been replaced with boost::system::error_code, and that class supports operator!.
Ok, I was mixing version of asio and didn't notice the changes between the two example files.
Well IPV6_UNICAST_HOPS is defined in my ws2tcpip.h. I'm using WinXP SP1 SDK. And my include path is pretty simple: boost only...
Unfortunately I can't tell what's going on from here, but it really looks to me like it's picking up an old ws2tcpip.h header from somewhere else. Asio includes that header from asio/detail/socket_types.hpp.
There is two versions of this file on my system and the other one (part of cygwin) in definitely not included in my path. Moreover I was compiling the example using the Jamfile provided so... I'll dig this if I have some time and keep you posted if I found out what's going on. Thanks for your precious help. JD
On 5/9/07, JD
Christopher Kohlhoff wrote:
JD writes: It sounds like you have a very old platform sdk or something on your include path. This should be defined for you in ws2tcpip.h.
Well IPV6_UNICAST_HOPS is defined in my ws2tcpip.h. I'm using WinXP SP1 SDK. And my include path is pretty simple: boost only...
Check your Project and Solutions settings as well. Tools->Options->Project and Solutions->VC++ Directories Then Show directories for include files. You may have an old version of the platform SDK listed before the newest one. HTH, --Michael Fawcett
participants (3)
-
Christopher Kohlhoff
-
JD
-
Michael Fawcett