add make command to README
This commit is contained in:
parent
7849bdf441
commit
aadf0e6d23
1 changed files with 4 additions and 1 deletions
|
@ -10,6 +10,9 @@ When you first build the project, try running `sbt update gen-idea`. This will b
|
||||||
|
|
||||||
When running `make`, the supporting Java code will be built, and the sample schema will be run through the code generator as well to produce the Java binding. You can find the generated code in `/examples/src/main/generated/Addressbook.java`
|
When running `make`, the supporting Java code will be built, and the sample schema will be run through the code generator as well to produce the Java binding. You can find the generated code in `/examples/src/main/generated/Addressbook.java`
|
||||||
|
|
||||||
|
Example of building and running from the command line:
|
||||||
|
|
||||||
```
|
```
|
||||||
echo '(people = [(id = 123, name = "Alice", email = "alice@example.com", employment = (school = "MIT"))])' | capnp encode examples/src/main/schema/addressbook.capnp AddressBook | java -cp generator/target/scala-2.11/classes:examples/target/scala-2.11/classes/ org.capnproto.examples.AddressbookMain read
|
$ make CXX_FLAGS="-std=c++11 -I/usr/local/include -L/usr/local/lib -lcapnp -lkj"
|
||||||
|
$ echo '(people = [(id = 123, name = "Alice", email = "alice@example.com", employment = (school = "MIT"))])' | capnp encode examples/src/main/schema/addressbook.capnp AddressBook | java -cp generator/target/scala-2.11/classes:examples/target/scala-2.11/classes/ org.capnproto.examples.AddressbookMain read
|
||||||
```
|
```
|
Loading…
Reference in a new issue