There seems to be a conflict with the windows headers between the mysql c-api and boost::asio.
If I include mysql first I get:
boost/asio/detail/socket_types.hpp(27) : fatal error C1189: #error : WinSock.h has already been included
#if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
# if defined(_WINSOCKAPI_) && !defined(_WINSOCK2API_)
# error WinSock.h has already been included
# endif // defined(_WINSOCKAPI_) && !defined(_WINSOCK2API_)
If I include boost::asio first I get:
include\config-win.h(24) : warning C4005: '_WIN32_WINNT' : macro redefinition
/* Defines for Win32 to make it compatible for MySQL */
#ifdef __WIN2000__
/* We have to do this define before including windows.h to get the AWE API
functions */
#define _WIN32_WINNT 0x0500
#else
/* Get NT 4.0 functions */
#define _WIN32_WINNT 0x0400
#endif
Is there some way around this, and why is mysql trying to force the windows version and boost trying to enforce that it include winsock its self anyway?