WinSock.h has already been included
Hi,
Why trying to use the asio library I'm getting the following error (I
believe this happens I include
You are probably #including
Hi,
Why trying to use the asio library I'm getting the following error (I believe this happens I include
once): WinSock.h has already been included c:\program files\boost\boost_1_35_0\boost\asio\detail\socket_types.hpp 27
I'm compiling using VS 2008 on WinXP.
Any idea how to deal with this?
Thanks, Jean
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Cory Nelson http://www.int64.org
Hi,
Thanks for your quick answer. I am not including
You are probably #including
prior to that without defining WIN32_LEAN_AND_MEAN first. On Mon, Jul 7, 2008 at 4:54 PM, Jean-Sebastien Stoezel
wrote: Hi,
Why trying to use the asio library I'm getting the following error (I believe this happens I include
once): WinSock.h has already been included c:\program files\boost\boost_1_35_0\boost\asio\detail\socket_types.hpp 27
I'm compiling using VS 2008 on WinXP.
Any idea how to deal with this?
Thanks, Jean
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Cory Nelson http://www.int64.org _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Jean-Sebastien Stoezel wrote:
Hi,
Thanks for your quick answer. I am not including
(I'm compiling a console application, without support for MFCs or precompiled headers). Here is what I have defined in the project: WIN32;_DEBUG;_CONSOLE I haven't defined WIN32_LEAN_AND_MEAN or any other macro (just included
). Any idea of what else this could be?
Thanks, Jean
Hi Are you using Boost date/time anywhere?? There are two includes of windows.h in filetime_functions.hpp and microsec_time_clock.hpp which do not have the "lean and mean" macro defined before the includes. For me, I had to add the "lean and mean" to microsec_time_clock.hpp just prior to the windows.h include to fix this error. Kevin
Hi,
Here are the boost header files I include in my application:
#include
Jean-Sebastien Stoezel wrote:
Hi, Thanks for your quick answer. I am not including
(I'm compiling a console application, without support for MFCs or precompiled headers). Here is what I have defined in the project: WIN32;_DEBUG;_CONSOLE I haven't defined WIN32_LEAN_AND_MEAN or any other macro (just included ). Any idea of what else this could be? Thanks, Jean Hi
Are you using Boost date/time anywhere??
There are two includes of windows.h in filetime_functions.hpp and microsec_time_clock.hpp which do not have the "lean and mean" macro defined before the includes.
For me, I had to add the "lean and mean" to microsec_time_clock.hpp just prior to the windows.h include to fix this error.
Kevin
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Jean-Sebastien Stoezel wrote:
Here are the boost header files I include in my application:
#include
#include #include I guess I am then using the boost date/time. I am not sure I understand what boost macros I need to define and so far I have defined none.
Isn't there another way to fix this issue, rather than hacking the boost files?
Add a #define WIN32_LEAN_AND_MEAN or #include
If you #include date_time prior to asio and as previously stated:
#define WIN32_LEAN_AND_MEAN
that should get rid of the errors..
Cheers,
Tim
On Tue, Jul 8, 2008 at 9:10 AM, gchen
Jean-Sebastien Stoezel wrote:
Here are the boost header files I include in my application:
#include
#include #include I guess I am then using the boost date/time. I am not sure I understand what boost macros I need to define and so far I have defined none.
Isn't there another way to fix this issue, rather than hacking the boost files?
Add a #define WIN32_LEAN_AND_MEAN or #include
before including all boost headers. #define WIN32_LEAN_AND_MEAN // #include
// or this #include #include #include _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Regards, Timothy St. Clair [timothysc@gmail.com]
Hi, Thanks for the advice, it solved the issue. Jean There is no other include. I still get: On 8-Jul-08, at 9:10 AM, gchen wrote:
Jean-Sebastien Stoezel wrote:
Here are the boost header files I include in my application: #include
#include #include I guess I am then using the boost date/time. I am not sure I understand what boost macros I need to define and so far I have defined none. Isn't there another way to fix this issue, rather than hacking the boost files? Add a #define WIN32_LEAN_AND_MEAN or #include
before including all boost headers. #define WIN32_LEAN_AND_MEAN // #include
// or this #include #include #include _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (5)
-
Cory Nelson
-
gchen
-
Jean-Sebastien Stoezel
-
Kevin Scarr
-
Tim St. Clair