PropertyTree-JSON parser incompatible with Boost.ASIO?
Hello folks,
as this is my first post on this list, I am apologizing for mistakes I
maybe made in advance.
Anyway, to my question: For my current project I need both,
Boost.PropertyTree (and it's JSON parser), as well as Boost.ASIO. When
including both headers, it gives me an error at
boost/asio/detail/socket_types.hpp(24), saying that WinSock.h has
already been included. However, if I comment out the include for
json_parser.hpp, it does not give any compiler errors (except the
non-exisiting function read_json).
I am working under Visual Studio 2013 Professional on Windows Server
2012 R2, boost 1.55.
Minimal code to reproduce the issue:
#include
Hi Jonas,
try to define this macro: WIN32_LEAN_AND_MEAN, and let me know.
Best,
Mirko
On Sat, May 24, 2014 at 4:48 PM, Jonas Stöhr
Hello folks,
as this is my first post on this list, I am apologizing for mistakes I maybe made in advance.
Anyway, to my question: For my current project I need both, Boost.PropertyTree (and it's JSON parser), as well as Boost.ASIO. When including both headers, it gives me an error at boost/asio/detail/socket_types.hpp(24), saying that WinSock.h has already been included. However, if I comment out the include for json_parser.hpp, it does not give any compiler errors (except the non-exisiting function read_json).
I am working under Visual Studio 2013 Professional on Windows Server 2012 R2, boost 1.55.
Minimal code to reproduce the issue:
#include
#include I hope that someboy can help.
Best regards, Jonas Stoehr _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Hi Mirko, thanks for you advice. It indeed fixed the problem. I read something similar, but the people there were complaining about problems with the Asio library and including Windows.h, not with property tree, that's why I haven't tried. Anyway, great thanks to you again. Regards Jonas Am 24.05.2014 23:27, schrieb mik:
Hi Jonas,
try to define this macro: WIN32_LEAN_AND_MEAN, and let me know.
Best, Mirko
__
On Sat, May 24, 2014 at 4:48 PM, Jonas Stöhr
mailto:stoehr_jonas@web.de> wrote: Hello folks,
as this is my first post on this list, I am apologizing for mistakes I maybe made in advance.
Anyway, to my question: For my current project I need both, Boost.PropertyTree (and it's JSON parser), as well as Boost.ASIO. When including both headers, it gives me an error at boost/asio/detail/socket_types.hpp(24), saying that WinSock.h has already been included. However, if I comment out the include for json_parser.hpp, it does not give any compiler errors (except the non-exisiting function read_json).
I am working under Visual Studio 2013 Professional on Windows Server 2012 R2, boost 1.55.
Minimal code to reproduce the issue:
#include
#include I hope that someboy can help.
Best regards, Jonas Stoehr _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org mailto:Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Jonas Stöhr
-
mik