c-capnproto icon indicating copy to clipboard operation
c-capnproto copied to clipboard

Howto use the program?

Open skinkie opened this issue 10 years ago • 2 comments

cat ../capnproto/c++/samples/addressbook.capnp | ./capnpc-c 
failed to read schema from stdin

Is there a how to use the program? Or isn't it finished?

skinkie avatar Jun 07 '14 17:06 skinkie

This issue is quite old so perhaps you've already discovered the answer to this, but I accidentally stumbled on it myself while reading the official docs on how to write a plugin. It seems that plugins expect a source file augmented with data layout comments.

capnp compile -I../capnproto/c++/src -oc ../capnproto/c++/samples/addressbook.capnp

To make this work, you need capnpc-c in your environment PATH. Even after this, it still does not work correctly:

cant find node with id 0xf264a779fef191ce
c: plugin failed: exit code 2

I suspect Cap'n Proto has gained some features since this C backend was last updated.

Smattr avatar Aug 27 '15 11:08 Smattr

I'll give it a shot :)

skinkie avatar Aug 27 '15 11:08 skinkie