Hi, Try adding this after including windows headers, but before capnp headers:
#include <kj/windows-sanity.h> This header tries to work around some of the garbage that Windows headers leave in the global namespace. -Kenton On Sun, Jun 14, 2020 at 10:53 AM 김동인 <[email protected]> wrote: > hi. > > now. i am in difficulty situation that some of header files conflicting. > > i haven't soloved this problem. > > let me show my example code inorder to make you understand my situation > T.T' > > ------------------ example code ------------------ > > #include <iostream> > #include <ws2tcpip.h> > #include <mswsock.h> > > #include "test-my.capnp.h" > #include <capnp/message.h> > #include <capnp/serialize-packed.h> > > int main() > { > ::capnp::MallocMessageBuilder message; > > TestMy::Builder testBuilder = message.initRoot<TestMy>(); > } > > ------------------------------------------------------ > > ws2tcpip.h and mswsock.h that i use in my main project conflict with some > of capn header files. > > if cap'n header files are used before ws2tcpip.h and mswsock.h, (below) > > ------------------ example code ------------------ > #include "test-my.capnp.h" > #include <capnp/message.h> > #include <capnp/serialize-packed.h> > > #include <iostream> > #include <ws2tcpip.h> > #include <mswsock.h> > > int main() > { > ::capnp::MallocMessageBuilder message; > > TestMy::Builder testBuilder = message.initRoot<TestMy>(); > } > > ------------------------------------------------------ > > the problem will be solved. > > but i feel that's very uncomfortable to use... > > besides now i can not use that like that codes > > because.... i am using precomplied header file in my project. > > so....it has became very complicated situation. > > could you give me good solution? > > T.T > > > -- > You received this message because you are subscribed to the Google Groups > "Cap'n Proto" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/capnproto/6bf9c24b-30ad-4664-823f-443e7fa0b31ao%40googlegroups.com > <https://groups.google.com/d/msgid/capnproto/6bf9c24b-30ad-4664-823f-443e7fa0b31ao%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Cap'n Proto" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/capnproto/CAJouXQk8qNBVEwjYQOO4ioqxLNP60i1nYH2-oi%2B8CYGmSHugWQ%40mail.gmail.com.
