Upgrading source from 2.00.2648 to 2.00.2661 I've got this error on VS2010:
RCF\include\RCF/external/asio/asio/detail/socket_types.hpp(22): fatal error C1189: #error : WinSock.h has already been included
Searching on net I've found the causes, but I'm not able (already using WIN32_LEAN_AND_MEAN - other errors putting winsok2.h on top of stdafx.h) to avoid the problem.
Can someone have found a solution ?
TIA
VS2010 fatal error C1189
[Solved]: VS2010 fatal error C1189
since when adding RCF.cpp to a project this file is marked as "Not Using Precompiled Headers", the line
#ifdef __MSC_VER
#define WIN32_LEAN_AND_MEAN
#endif
must be inserted in RCF.cpp before <boost/config>
This solve the problem.
#ifdef __MSC_VER
#define WIN32_LEAN_AND_MEAN
#endif
must be inserted in RCF.cpp before <boost/config>
This solve the problem.
Re: VS2010 fatal error C1189
Yes, you will generally need to have WIN32_LEAN_AND_MEAN defined, when building on Windows. In build 2664, I've changed the error message that emanates from Boost.Asio, to indicate this.
The easiest way to deal with this is to specify WIN32_LEAN_AND_MEAN in your build settings (pass -DWIN32_LEAN_AND_MEAN in as a command line option to the compiler), that way you won't have to modify the source.
The easiest way to deal with this is to specify WIN32_LEAN_AND_MEAN in your build settings (pass -DWIN32_LEAN_AND_MEAN in as a command line option to the compiler), that way you won't have to modify the source.