On 8 December 2011 16:51, Alvaro Queipo de Llano Escribano
<[email protected]> wrote:
> Hello everyone,
>
> I am trying to use SOCI ODBC with BOOST (ansio sockets) and I am getting the
> following error.
> Error 1 error C1189: #error : WinSock.h has already been included
>
> I guess it is because in soci-odbc.h there is a #include <windows.h> that
> also includes WinShock.h.
Yes, indeed.
AFAIK, Boost.Asio requires particular order of includes to enable winsock2.
Simply, include winsock2.h first, before boost/asio.hpp and SOCI headers:
#include <winsock2.h>
#include <soci.h>
#include <soci-odbc.h>
#include <boost/asio.hpp>
int main()
{
}
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
Member of ACCU, http://accu.org
------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of
discussion for anyone considering optimizing the pricing and packaging model
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users