To build the zenoh-c client API you need to ensure that cmake is available on your platform -- if not please install it.
Once the cmake dependency is satisfied, just do the following for CMake version 3 and higher:
-- CMake version 3 and higher --
$ cd /path/to/zenoh-c
$ mkdir build
$ cd build
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ make
$ make install # on linux use **sudo**
For those that still have CMake version 2.8, do the following commands:
$ cd /path/to/zenoh-c
$ mkdir build
$ cd build
$ cmake -DCMAKE_BUILD_TYPE=Release ../cmake-2.8
$ make
$ make install # on linux use **sudo**
If you want to build with debug symbols configure with the option -DCMAKE_BUILD_TYPE=Debug.
The simplest way to run some of the example is to get a prebuilt instance of the zenoh network router at http://github.com/atolab/atobin and then to run the examples on your machine.
Assuming you've downloaded the zenoh network service on the current directory, then simply do:
$ ./zenohd
To see the zenoh manual page, simply do:
$ ./zenohd --help
Assuming that (1) you are running the zenoh network service, and (2) you are under the build directory, do:
$ ./z_sub
And on another shell, do:
$ ./z_pub
Assuming you are running the zenoh network service, do:
$ ./z_storage
And on another shell, do:
$ ./z_pub
After a few publications just terminate the publisher, and then try to query the storage:
$ ./z_query