Open cquartier opened 7 years ago
I encountered this problem too. It appears to be necessary if you use
using C = import "/capnp/c.capnp";
$C.fieldgetset;
I don't have a workaround but I'm looking into it.
I "solved" this by adding an annotation that allows you to omit the include directive from generated files. For example, c.capnp
has ID 0xc0183dd65ffef0f3
. So in your schema file, you'd put:
using C = import "/capnp/c.capnp";
$C.donotinclude(0xc0183dd65ffef0f3);
The C files generated from this schema will not have #include "c.capnp.h"
in them.
You can see this in my annotations branch.
I see this included even in the file tests/addressbook.capnp.h
https://github.com/opensourcerouting/c-capnproto/blob/master/tests/addressbook.capnp.h#L10
#include "c.capnp.h"
This header file is not installed by
make install
Why is this file included in the resulting schema header? If it is necessary shouldn't
c.capnp.h
be installed along with other headers?