On Mon, Feb 6, 2017 at 11:03 AM, Kenton Varda <[email protected]> wrote:
> On Mon, Feb 6, 2017 at 4:47 AM, <[email protected]> wrote: > >> Hi >> I have important questions about dynamic reflection: >> Is that true that dynamic reflection works only with compiled *.capnp >> files (and statically linked to exe/dll)? >> > > No. You can load schemas dynamically using `capnp::SchemaLoader` (if you > already have them in binary format as defined in `schema.capnp`) or > `capnp::SchemaParser` (to parse text schemas at runtime). > > >> And it is not possible just to have *.capnp file and compile them "on the >> fly" and use in dynamic reflection? >> > > You can use `capnp::SchemaParser`. You will need to link against the > library `libcapnpc.so` in addition to `libcapnp.so`. > > However, it's more secure and robust to exchange schemas in binary format > if possible, and that does not require `libcapnpc.so`. > Also, libcapnpc (for `capnp::SchemaParser`) isn't available under MSVC, which it sounds like you'd like to target, Jacek. It should build with VS2017 eventually, but in the meantime, `capnp::SchemaLoader` is the only option under MSVC. -- 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]. Visit this group at https://groups.google.com/group/capnproto.
